This code has always been wrong. Take a look at it for me. I have studied it for one afternoon. Thank you & nbsp; & lt; ahrefindex. php & gt; return message board & lt; a & gt; & lt; hr & gt; & lt ;? Php * & nbsp; * the Tochangethetemplateforthisgeneratedfilegoto & nbsp code is always incorrect. Take a look at it for me. I have studied it for one afternoon. Thank you.
Back to message board
/*
* To change the template for this generated file go
* Window-Preferences-PHPeclipse-PHP-Code Templates
*/
Require ("conn. php ");
$ User = $ _ POST ['user'];
$ Title = $ _ POST ['title'];
$ Content = $ _ POST ['content'];
$ SQL _luck = "insert into sny (id, user, title, content, lastDate) value ('', '$ user',' $ title', '$ content ', now ())";
$ SQL = "SELECT user FROM sny WHERE user = '$ user '";
$ Query = mysql_query ($ SQL );
$ Rows = mysql_fetch_array ($ query );
If ((! Empty ($ _ POST ['sub']) and ($ rows ['user'] = $ user )){
// Echo $ content;
Echo "script" alert ('User already exists, enter 'again); location. href = 'add2. php' script "; exit;
Mysql_free_result ($ query); exit;
}
Else {
Mysql_query ($ SQL _luck );
Echo "script" alert ('Yo! Successful! '); Location. href = 'index. php' script ";
Echo "successful insertion ";
}
?>
User:
Title:
Content: <Br/> text
------ Solution --------------------
Can I use and in php or use the & symbol .?
------ Solution --------------------
Take a closer look at your judgment. Okay?