![]() |
|
#1
|
|||
|
|||
Very New php/mysqlI must admit that I am treading foreign waters when working with mysql & php, but in researching many other errors that I have been receiving while "trying to correct some errors in the code below, I decide to register, as I am stumped.
Parse error: parse error, unexpected T_VARIABLE on line 47 is the most recent error that I am receiving, and I am not sure what to do. I have read several posts, and manuals, but I am lost. I do apologize for the, what is probably an elementary problem, but your help is most appreciated. Here is the code: PHP Code:
Last edited by JdS : 26-Jan-2005 at 10:25.
Reason: did not insert php code correctly
|
|||
|
#2
|
||||
|
||||
|
Hello phpnewbie,
It's simply a typo I think, you missed the (opening) curly bracket in the while() structure. PLUS, you seem to have an extra (opening) bracket in this line: while (($row=mysql_fetch_row($result)) __________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#3
|
|||
|
|||
different parseThanks You, I have corrected that one (I think) but I am now seeing
Parse error: parse error, unexpected $ on line 56 And the code stops at line 55, or at least that is how it looks.. Here is the code from line 46 to the end: PHP Code:
Again I apologize for my ignorance.... this is all a learning exerience for me. Quote:
|
|
#4
|
||||
|
||||
|
Try replacing that bit with this instead...
PHP Code:
__________________
J de Silva Learning Journal | GIDForums™ | GIDNetwork™ | GIDWebhosts™ | GIDSearch™ |
|
#5
|
|||
|
|||
|
I have made the requested changes and a different group errors have displayed. Here are the errors that I am receiving, and my Code. Sorry about the length, I was trying NOT to post all of it, but I am stuck, I have read most of the MySql manual, but not know the intricacies of the program, I am not Quite sure what I'm looking for.
Errors: Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource on line 11 Warning: Cannot add header information - headers already sent by (output started at xx.php:11) on line 40 Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource on line 48 Here is the code starting at line 9 PHP Code:
|
|
#6
|
||||
|
||||
|
By taking a quick look at your code, it seems to me that you should replace all mysql() with mysql_db_query.
So $result=mysql("$DBName","SELECT CartItemsID,Date FROM CartItems"); would become $result=mysql_db_query("$DBName","SELECT CartItemsID,Date FROM CartItems"); etc. Hope that's it, Dave. |
|
#7
|
|||
|
|||
|
Thanks Dave, I have printed out your suggestion, but future use, but that doesn't seem to solve my issue. I started another thread, as this thread answered the 1st few questions I had. Thank you for your input
Quote:
|
Recent GIDBlog
Problems with the Navy (Enlisted) by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PHP/MySQL coding issue | cmarti | MySQL / PHP Forum | 3 | 26-Jul-2004 08:01 |
| Problem with php/mysql script during runtime | norok | MySQL / PHP Forum | 3 | 25-Jun-2003 05:35 |
| PHP/mySQL backend configuration help needed | jrobbio | Web Design Forum | 2 | 17-Apr-2003 10:07 |
| Tripod UK offering PHP/MySQL! | roly | Free Web Hosting | 15 | 04-May-2002 03:46 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The