Jump to content


Photo

simple mistakes


  • Please log in to reply
2 replies to this topic

#1 grlayouts

grlayouts
  • Members
  • PipPipPip
  • Advanced Member
  • 342 posts

Posted 23 September 2006 - 07:30 AM

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?

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'");}

anyone?

#2 donjaime

donjaime
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 23 September 2006 - 07:33 AM

CORRECTED:
---------------------
       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'");}
------------------------

You missed a few semi colons and a close bracket



#3 donjaime

donjaime
  • New Members
  • Pip
  • Newbie
  • 4 posts

Posted 23 September 2006 - 07:34 AM

Use eclipse with the php plugin. Really useful.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users