![]() |
|
Welcome to the Computer Webmaster Gaming Console Graphics Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
| |||||||
| PHP PHP for some can be one of the hardest website programming codes, so do you need help on your PHP script, if it is php4, php5 or lower this is the place for you for any PHP help. |
![]() |
| | LinkBack | Thread Tools | Display Modes |
| | #1 | ||
| Yeah... what does Parse error: parse error, unexpected T_STRING mean? The code in question is <?php $dbcnx = mysql_connect("localhost", "username", "password") mysql_query(status); ?> Why doesn't this work?? Thanks. -Ev | |||
|
| Advertisements |
| | #2 | ||
| "EV3" <ev001@hotmail.com> a écrit dans le message de news: 2JWUa.58877$Ii1.40046@news02.bloor.is.net.cable.ro gers.com... > Yeah... what does Parse error: parse error, unexpected T_STRING mean? > > The code in question is > > <?php > > $dbcnx = mysql_connect("localhost", "username", "password") > > mysql_query(status); > > ?> > > > Why doesn't this work?? Hi, What is "status" ? Inside mysql_query() must be a string ($query) with the SQL query you wish. -- Gromitt | |||
|
| | #3 | ||
| On 27-Jul-2003, "EV3" <ev001@hotmail.com> wrote: > Yeah... what does Parse error: parse error, unexpected T_STRING mean? > > The code in question is > > <?php > > $dbcnx = mysql_connect("localhost", "username", "password") > > mysql_query(status); > > ?> It means you left the semicolon off the end of the mysql_connect() statement. Your next problem is the argument to mysql_query, unless 'status' is a constant (in which case it should be capitalized, by convention) it needs a $ (i.e. $status) to make it a variable. -- Tom Thackrey www.creative-light.com | |||
|
| | #4 | ||
| "EV3" <ev001@hotmail.com> wrote in message news:2JWUa.58877$Ii1.40046@news02.bloor.is.net.cab le.rogers.com... > Yeah... what does Parse error: parse error, unexpected T_STRING mean? > > The code in question is > > <?php > > $dbcnx = mysql_connect("localhost", "username", "password") > > mysql_query(status); > > ?> > > > Why doesn't this work?? You missed a semi-colon after the mysql_connect line, causing the parse error. mysql_query(status); seems to be meaningless, you need to pass a query string, and catch the result of the query. You've not selected a database. You've ignored return values. HTH, Andy | |||
|
| Featured Websites | ||||
|
![]() |
| Tags: error, mean, parse, t_string, unexpected |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| cvs: pear /Text_Wiki/Text/Wiki/Parse/Creole Url.php | Michele Tomaiuolo | Pear | 0 | 05-27-2007 7:47 PM |
| cvs: pear /Text_Wiki/Text/Wiki/Parse/Creole Footnote.php | Michele Tomaiuolo | Pear | 0 | 05-27-2007 7:47 PM |
| cvs: pear /Text_Wiki/Text/Wiki/Parse/Creole List.php | Michele Tomaiuolo | Pear | 0 | 05-27-2007 7:47 PM |
| cvs: pear /Text_Wiki/Text/Wiki/Parse/Creole Url.php | Michele Tomaiuolo | Pear | 0 | 05-27-2007 7:47 PM |
| PEAR DB ERROR: db_error: message="DB Error: insufficient data supplied" code=-20 | Kevin McCarthy | Pear | 0 | 05-20-2007 6:34 PM |
| Featured Websites | ||||
|