View Single Post
Old 02-14-2008, 12:28 AM   #11 (permalink)
SOCK
The Acquainted
 
Join Date: Nov 2007
Posts: 154
Thanks: 31
SOCK is on a distinguished road
Default

Ok, the error message is really odd. It almost looks like the httpd server isn't parsing PHP correctly and instead outputting all your PHP code. It seems as if it begins with the call to mysql_connect() but I don't see why.

Have you been successfully connecting to MySQL from this or another PHP script? Does this script have the .php extension (or the appropriate extension to parse PHP)?

Please use the provided PHP code tags when posting, it makes it much easier to spot errors, e.g.
PHP Code:
$variable 'something'
Something else in your code important to mention; you're using addslashes() and mysql_real_escape_string(). Bad combination. You're going to get slashes upon slashes in your stored data. Not to mention if you have magic_quotes turned "On" as well, you'll have three sets of slashes. It can get intense.

Make sure magic_quotes is turned "Off", and use mysql_real_escape_string() only.
__________________
I reject your reality, and substitute my own.
SOCK is offline  
Reply With Quote
The Following User Says Thank You to SOCK For This Useful Post:
StevenF (02-14-2008)