I'm with a little problem... i have this php code and when i lick F5 (refresh) it keeps adding files do database... i think "if ($Submit)" is not doing what i want! My propose is clicking on submit it adds me the $titulotxt and $cds to the database using $PATH_INFO. How must i do to resolve my problem? Thanks : )
if ($Submit) { $ligacao=mysql_connect("localhost","nac31915","alanis") or die (mysql_error()); $sql="INSERT INTO divxtemp (titulo,cds) VALUES ('$titulotxt','$cdstxt')"; if ($ligacao) { mysql_db_query("DB_nac31915",$sql) or die (mysql_error()); } mysql_close(); } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Adicionar Novo(s) Filme</title> </head> <body bgcolor="#DEE3E7"> <table width="50%" height="20" border="1" align="center" bordercolor="#000000"> <tr><td align="center" bgcolor="#98AAB1"><font color="#FFFFFF" face="Courier New, Courier, mono"><strong>Adicionar Filme</strong></font></td></tr> <tr><td> <form action="<?echo $PATH_INFO?>" method="post" name="divxadd" id="divxadd"> <table width="70%" height="20" border="0" align="center" cellspacing=10> <tr><br><td align="right">Título:</td><td align="left"><input size="40" name="titulotxt" type="text" id="titulotxt"></td></tr> <tr><td align="right">Cds:</td><td> <table width="100%" height="20" border="0" align="center"> <tr><td align="left"><input size="2" name="cdstxt" type="text" id="cdstxt"></td><td align="center"><input type="Submit" name="Submit" value="Adicionar"></td> </table> </td> </tr> </table> </form> </td></tr> </table> <br> <? include('addlist.php'); ?> </body> </html> -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php