MY PHP MySQL Function keeps returning error message: "Database Query Failed"

Reply

Join Date: Aug 2007
Posts: 165
Reputation: Fest3er is an unknown quantity at this point 
Solved Threads: 18
Fest3er Fest3er is offline Offline
Junior Poster

Re: MY PHP MySQL Function keeps returning error message: "Database Query Failed"

 
0
  #11
Sep 18th, 2009
Originally Posted by HFK11 View Post
  1. 1.
  2. $connection="mysql_connect('localhost', 'admin', '1admin') or die(mysql_error())";// host account password
If I may ever so gnetly ask a dumb question, why is the function call inside quotes? This results in $connection containing the string you see, rather than a handle referencing the desired database connection. To actually execute mysql_connect, you need to remove the double quotes.
Reply With Quote Quick reply to this message  
Reply

Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC