tooba Posted February 8, 2007 Share Posted February 8, 2007 hello everyone.... i m a newbie to php n myysql world.....i got stuck in a very trivial problem...while connecting my test mysql databse to PHP using a test script, i m getting this message "Call to undefined function mysql_connect()" the script i wrote is this: <?php $link = mysql_connect("localhost", "root", "admin"); mysql_select_db('demo',$link); $result = mysql_query("SELECT * FROM members"); while($row = mysql_fetch_array($result)) { echo $row['firstName'] . ' ' . $row['lastName']; } mysql_close($link); ?> "demo" is my test database...i put thisPpHP file in my web server root directory...i've tried every possible thing but prob couldnt got fix .... can neone tell me wht i m missing...i have searched many websites on the net but all told the same thing as i've done.... Regards, Tooba Quote Link to comment Share on other sites More sharing options...
Jessica Posted February 8, 2007 Share Posted February 8, 2007 sounds like php wasn't configured with mysql. http://us3.php.net/manual/en/ref.mysql.php Quote Link to comment Share on other sites More sharing options...
KrisNz Posted February 8, 2007 Share Posted February 8, 2007 did you read the f.a.q http://www.phpfreaks.com/forums/index.php/topic,95378.0.html? Quote Link to comment Share on other sites More sharing options...
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.