• Revista PROGRAMAR: Já está disponível a edição #53 da revista programar. Faz já o download aqui!

Sign in to follow this  
Followers 0

ajuda com um insert

3 posts in this topic


ja estou de volta deste codigo ha horas...pouco ou nada percebo de php...

alguem me pode dizer o que de mal existe no codigo postado?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>

<div id="texto">
<form name="noticia" method="post" action="">
<input type="submit" name="guardar" value="Guardar" class="submit" / >

mysql_connect("aerver", "db", "pass") or die(mysql_error());
echo "Connected to MySQL<br />";

$query = "INSERT INTO tabela (s_by, s_time, s_shout) values(1, $t, 'mensagem automatica em teste do file a parte')";
$doQuery = mysql_query($query);
    echo '<script type="text/javascript">alert("inserido com sucesso")</script>';
     echo '<META http-equiv="refresh" content="0;URL=www.google.com">';




Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
Followers 0