PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Yes, that is FormData.php... was suppose to be a quick test... but it is now not quick and seems to test only that I am not a php coder.
I got the syntax online from a sample. I just made it point to my specifics. I don't really understand all of what it is doing... but it looks straight forward.. but line 10 is suspicious now that you point it out...
Jcart wrote:The error most likely exists on your included files.. there certainly is no parse error on the code you've posted.
There is some HTML Style tags in the constants.php... I guess that could be an issue... otherwise it is just a bunch of variables... that have been in use for about a year... but it is worth checking out.... thank you.
Parse error: parse error, unexpected T_STRING in FormData.php on line 11
To state the obvious, I don't get it...
In this EXACT code that you've posted, there aren't any parsing errors. I've copied it into my editor and ran it on localhost in my web browser. The results?
Warning: mysql_connect() [function.mysql-connect]: Unknown MySQL server host 'my.server.net' (11004) in C:\Apache2\Apache2\htdocs\crap\testing.php on line 6
Warning: mysql_select_db() [function.mysql-select-db]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\Apache2\Apache2\htdocs\crap\testing.php on line 7
Warning: mysql_select_db() [function.mysql-select-db]: A link to the server could not be established in C:\Apache2\Apache2\htdocs\crap\testing.php on line 7
Warning: mysql_query() [function.mysql-query]: Access denied for user 'ODBC'@'localhost' (using password: NO) in C:\Apache2\Apache2\htdocs\crap\testing.php on line 9
Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in C:\Apache2\Apache2\htdocs\crap\testing.php on line 9
Access denied for user 'ODBC'@'localhost' (using password: NO)
Those errors are just because I don't have the database set up. It got past the parser so there's no parsing errors. Perhaps an include or something is causing the error. The file that the error is on is formData.php. Are you sure you're posting the formData.php code?
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
ok... very odd. Starting at line 10, none of the spaces are actually spaces. I turned on "show hidden characters" and what should be spaces are not denoted the same way as actual spaces. I guess I could throw it in a hex reader and find out but ....
So anyway, thanks to everyone showing me the actual code was right... I simply deleted the bad "spaces" and replaced them with good "spaces"... Now it works. As expected...
Again, thanks for the help on getting my first ever select statement to work...
I suspect you're using a bad editor.. such as one that inserts hidden characters.
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
I use bbedit. The code that had the bad spaces was cut and paste from the web. The code I typed out myself had no issues... but I'll leave the option for showing hidden characters on for a bit.