[PHP-DB] need help spotting this php parse error
When i run this script it tells me that I have a parse error on line 34? I really can't see it anyhelp (please!) would be much appreciated Cheers, Dave ? session_start(); if(!$HTTP_COOKIE_VARS[username]) { /* The Cookie is not set, so load the page as if it is the first time */ include(library/include/header.php); include(library/include/database.php); /* Include a header file and a database connections/functions file */ ? form name=login method=post action= select name=select ? $query = SELECT * FROM Staff WHERE ResterauntId = 1; $result = mysql_query($query) or die( mysql_error () ); While( $row = mysql_fetch_array($result) ) { ? option value=? echo $row[0]; ?? echo $row[1]; echo $row[2]; ?/option ? } ? /select /form _ Stay in touch with MSN Messenger http://messenger.msn.co.uk -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] need help spotting this php parse error
Tell us specifically what the parse error is reporting to you and specifically what line is line 34. -Original Message- From: David Rice [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 2:53 PM To: [EMAIL PROTECTED] Subject: [PHP-DB] need help spotting this php parse error When i run this script it tells me that I have a parse error on line 34? I really can't see it anyhelp (please!) would be much appreciated Cheers, Dave ? session_start(); if(!$HTTP_COOKIE_VARS[username]) { /* The Cookie is not set, so load the page as if it is the first time */ include(library/include/header.php); include(library/include/database.php); /* Include a header file and a database connections/functions file */ ? form name=login method=post action= select name=select ? $query = SELECT * FROM Staff WHERE ResterauntId = 1; $result = mysql_query($query) or die( mysql_error () ); While( $row = mysql_fetch_array($result) ) { ? option value=? echo $row[0]; ?? echo $row[1]; echo $row[2]; ?/option ? } ? /select /form _ Stay in touch with MSN Messenger http://messenger.msn.co.uk -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] need help spotting this php parse error
you might try pulling the semi colon out before while. i put it in red. i think,that's probably it. addison When i run this script it tells me that I have a parse error on line 34? I really can't see it anyhelp (please!) would be much appreciated Cheers, Dave ? session_start(); if(!$HTTP_COOKIE_VARS[username]) { /* The Cookie is not set, so load the page as if it is the first time */ include(library/include/header.php); include(library/include/database.php); /* Include a header file and a database connections/functions file */ ? form name=login method=post action= select name=select ? $query = SELECT * FROM Staff WHERE ResterauntId = 1; $result = mysql_query($query) or die( mysql_error () ); While( $row = mysql_fetch_array($result) ) { ? option value=? echo $row[0]; ?? echo $row[1]; echo $row[2]; ?/option ? } ? /select /form _ Stay in touch with MSN Messenger http://messenger.msn.co.uk -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Addison Ellis small independent publishing co. 114 B 29th Avenue North Nashville, TN 37203 (615) 321-1791 [EMAIL PROTECTED] [EMAIL PROTECTED] subsidiaries of small independent publishing co. [EMAIL PROTECTED] [EMAIL PROTECTED]
RE: [PHP-DB] need help spotting this php parse error
It Does have a closing Brace, just check my second email it contains the FULL code.. i missed the last few lines copying it the first time somehow. From: Andreas Sheriff [EMAIL PROTECTED] To: David Rice [EMAIL PROTECTED] Subject: RE: [PHP-DB] need help spotting this php parse error Date: Thu, 23 Jan 2003 12:09:15 -0800 The if statement does not have a closing brace. -Original Message- From: David Rice [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 11:53 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] need help spotting this php parse error When i run this script it tells me that I have a parse error on line 34? I really can't see it anyhelp (please!) would be much appreciated Cheers, Dave ? session_start(); if(!$HTTP_COOKIE_VARS[username]) { /* The Cookie is not set, so load the page as if it is the first time */ include(library/include/header.php); include(library/include/database.php); /* Include a header file and a database connections/functions file */ ? form name=login method=post action= select name=select ? $query = SELECT * FROM Staff WHERE ResterauntId = 1; $result = mysql_query($query) or die( mysql_error () ); While( $row = mysql_fetch_array($result) ) { ? option value=? echo $row[0]; ?? echo $row[1]; echo $row[2]; ?/option ? } ? /select /form _ Stay in touch with MSN Messenger http://messenger.msn.co.uk -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ Use MSN Messenger to send music and pics to your friends http://messenger.msn.co.uk -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] need help spotting this php parse error
In your second e-mail you posted the error message, but failed to identify line 34. This is important so we can tell what code the parser is gagging on. Otherwise, it's going to take longer to get an answer because we're guessing which line is line 34. -Original Message- From: David Rice [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 3:11 PM To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: RE: [PHP-DB] need help spotting this php parse error It Does have a closing Brace, just check my second email it contains the FULL code.. i missed the last few lines copying it the first time somehow. From: Andreas Sheriff [EMAIL PROTECTED] To: David Rice [EMAIL PROTECTED] Subject: RE: [PHP-DB] need help spotting this php parse error Date: Thu, 23 Jan 2003 12:09:15 -0800 The if statement does not have a closing brace. -Original Message- From: David Rice [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 11:53 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] need help spotting this php parse error When i run this script it tells me that I have a parse error on line 34? I really can't see it anyhelp (please!) would be much appreciated Cheers, Dave ? session_start(); if(!$HTTP_COOKIE_VARS[username]) { /* The Cookie is not set, so load the page as if it is the first time */ include(library/include/header.php); include(library/include/database.php); /* Include a header file and a database connections/functions file */ ? form name=login method=post action= select name=select ? $query = SELECT * FROM Staff WHERE ResterauntId = 1; $result = mysql_query($query) or die( mysql_error () ); While( $row = mysql_fetch_array($result) ) { ? option value=? echo $row[0]; ?? echo $row[1]; echo $row[2]; ?/option ? } ? /select /form _ Stay in touch with MSN Messenger http://messenger.msn.co.uk -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ Use MSN Messenger to send music and pics to your friends http://messenger.msn.co.uk -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] need help spotting this php parse error
Unless what showed up here isn't what you posted (quite possible), the only differences between the first and second time you posted were: -require instead of include -Removed quotes on option value=... If you count your open and close braces, they don't seem to match up. There's a close brace for the while() statement, but there isn't one for the if(). Also, perhaps it's just the email format, but its awfully hard to read your code as posted. Here's code that came across in the second post, cleaned up to read easier: ? session_start(); if(!$HTTP_COOKIE_VARS[username]) { /* The Cookie is not set, so load the page as if it is the first time */ require(library/include/header.php); require(library/include/database.php); /* Include a header file and a database connections/functions file */ ? form name=login method=post action= select name=select ? $query = SELECT * FROM Staff WHERE ResterauntId = 1; $result = mysql_query($query) or die( mysql_error () ); while( $row = mysql_fetch_array($result) ) { ? option value=? echo $row[0]; ?? echo $row[1]; echo $row[2]; ?/option ? } ? /select /form --- David Rice [EMAIL PROTECTED] wrote: It Does have a closing Brace, just check my second email it contains the FULL code.. i missed the last few lines copying it the first time somehow. From: Andreas Sheriff [EMAIL PROTECTED] To: David Rice [EMAIL PROTECTED] Subject: RE: [PHP-DB] need help spotting this php parse error Date: Thu, 23 Jan 2003 12:09:15 -0800 The if statement does not have a closing brace. -Original Message- From: David Rice [mailto:[EMAIL PROTECTED]] Sent: Thursday, January 23, 2003 11:53 AM To: [EMAIL PROTECTED] Subject: [PHP-DB] need help spotting this php parse error When i run this script it tells me that I have a parse error on line 34? I really can't see it anyhelp (please!) would be much appreciated Cheers, Dave ? session_start(); if(!$HTTP_COOKIE_VARS[username]) { /* The Cookie is not set, so load the page as if it is the first time */ include(library/include/header.php); include(library/include/database.php); /* Include a header file and a database connections/functions file */ ? form name=login method=post action= select name=select ? $query = SELECT * FROM Staff WHERE ResterauntId = 1; $result = mysql_query($query) or die( mysql_error () ); While( $row = mysql_fetch_array($result) ) { ? option value=? echo $row[0]; ?? echo $row[1]; echo $row[2]; ?/option ? } ? /select /form _ Stay in touch with MSN Messenger http://messenger.msn.co.uk -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php _ Use MSN Messenger to send music and pics to your friends http://messenger.msn.co.uk -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php = Mark Weinstock [EMAIL PROTECTED] *** You can't demand something as a right unless you are willing to fight to death to defend everyone else's right to the same thing. -Stolen from the now-defunct Randy's Random mailing list. *** __ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP-DB] need help spotting this php parse error
Dunno. I also remember once having a parse error, but it was on line 35. Cheers Ignatius - Original Message - From: David Rice [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, January 23, 2003 8:53 PM Subject: [PHP-DB] need help spotting this php parse error When i run this script it tells me that I have a parse error on line 34? I really can't see it anyhelp (please!) would be much appreciated Cheers, Dave ? session_start(); if(!$HTTP_COOKIE_VARS[username]) { /* The Cookie is not set, so load the page as if it is the first time */ include(library/include/header.php); include(library/include/database.php); /* Include a header file and a database connections/functions file */ ? form name=login method=post action= select name=select ? $query = SELECT * FROM Staff WHERE ResterauntId = 1; $result = mysql_query($query) or die( mysql_error () ); While( $row = mysql_fetch_array($result) ) { ? option value=? echo $row[0]; ?? echo $row[1]; echo $row[2]; ?/option ? } ? /select /form _ Stay in touch with MSN Messenger http://messenger.msn.co.uk -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP-DB] need help spotting this php parse error
Hi Probably a missing ; ? option value=? echo $row[0]; ?? echo $row[1]; echo $row[2]; ?/option ? } ; - here ? /select /form -Original Message- From: Ignatius Reilly [mailto:[EMAIL PROTECTED]] Sent: 23 January 2003 22:00 To: David Rice; [EMAIL PROTECTED] Subject: Re: [PHP-DB] need help spotting this php parse error Dunno. I also remember once having a parse error, but it was on line 35. Cheers Ignatius - Original Message - From: David Rice [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, January 23, 2003 8:53 PM Subject: [PHP-DB] need help spotting this php parse error When i run this script it tells me that I have a parse error on line 34? I really can't see it anyhelp (please!) would be much appreciated Cheers, Dave ? session_start(); if(!$HTTP_COOKIE_VARS[username]) { /* The Cookie is not set, so load the page as if it is the first time */ include(library/include/header.php); include(library/include/database.php); /* Include a header file and a database connections/functions file */ ? form name=login method=post action= select name=select ? $query = SELECT * FROM Staff WHERE ResterauntId = 1; $result = mysql_query($query) or die( mysql_error () ); While( $row = mysql_fetch_array($result) ) { ? option value=? echo $row[0]; ?? echo $row[1]; echo $row[2]; ?/option ? } ? /select /form _ Stay in touch with MSN Messenger http://messenger.msn.co.uk -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php