grlayouts Posted September 23, 2006 Share Posted September 23, 2006 ok i know i've made a really minor mistake but i've look at it so many times i cant see what it is?[code]if ($view == loginnews) { print "<form method=post action=admin.php?view=loginnews&step=add>News: <input type=text name=message> <input type=submit value=Add></form>"; if ($step == Add) {mysql_fetch_row(mysql_query("SELECT loginmsg FROM messages WHERE message='message';"))mysql_query("INSERT INTO messages VALUES ('message','$message');")else{ mysql_query("UPDATE messages SET loginmsg=$message WHERE message='message'");}[/code]anyone? Link to comment https://forums.phpfreaks.com/topic/21756-simple-mistakes/ Share on other sites More sharing options...
donjaime Posted September 23, 2006 Share Posted September 23, 2006 CORRECTED:---------------------[code] if ($view == loginnews) { print "<form method=post action=admin.php?view=loginnews&step=add>News: <input type=text name=message> <input type=submit value=Add></form>"; if ($step == Add) {mysql_fetch_row(mysql_query("SELECT loginmsg FROM messages WHERE message='message';"));mysql_query("INSERT INTO messages VALUES ('message','$message');"); }else{ mysql_query("UPDATE messages SET loginmsg=$message WHERE message='message'");}[/code]------------------------You missed a few semi colons and a close bracket Link to comment https://forums.phpfreaks.com/topic/21756-simple-mistakes/#findComment-97146 Share on other sites More sharing options...
donjaime Posted September 23, 2006 Share Posted September 23, 2006 Use eclipse with the php plugin. Really useful. Link to comment https://forums.phpfreaks.com/topic/21756-simple-mistakes/#findComment-97147 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.