Jump to content

Archived

This topic is now archived and is closed to further replies.

grlayouts

simple mistakes

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.