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 Link to comment https://forums.phpfreaks.com/topic/37578-problem-in-connecting-mysql-database-to-php/ 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 Link to comment https://forums.phpfreaks.com/topic/37578-problem-in-connecting-mysql-database-to-php/#findComment-179700 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? Link to comment https://forums.phpfreaks.com/topic/37578-problem-in-connecting-mysql-database-to-php/#findComment-179704 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.