General Doom Posted April 2, 2009 Posted April 2, 2009 Hey all, i've not coded in awhile, and im embaressed to post this, but for the life of me I cannot find the problem. Im creating a site but cannot get it to connect to the database, heres a sample script: <?php include_once 'db_connect.php'; $fetch=mysql_query("SELECT * FROM users WHERE id='$1'"); $info = mysql_fetch_object($fetch); echo "$fetch->firstname"; echo "$info->firstname"; ?> It just displays nothing, the mySQL is scorrect (as far as I can tell) and my db_connect has all the correct info. Please help! Quote
General Doom Posted April 2, 2009 Author Posted April 2, 2009 Re: Cannot connect to Database. Nevermind, I found the error, after about 3 hours my dad came in and read the code to me, and I instantly knew the error lol. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.