Hi All,
I am brand new to PHP and I am really just learning it having installed the compiler for it along with a command-line version of MySQL on my apache server.
I have been trying to connect to this MySQL database but get an error msg. I am using the following line of code to connect:
$link = mysql_connect("localhost", "pisey", "testpisey");
mysql_select_db("cellcard", $link);
$result = mysql_query("SELECT * FROM tbType ORDER BY ordernum", $link);
$num_rows = mysql_num_rows($result);
echo "$num_rows Rows\n";
And below is the msg error:
Fatal error: Call to undefined function: mysql_connect() in /var/www/mobile/php/game.php on line 36
Note: I am using PHP4.
So do I need to install or configure anything else on the server?
Any help would be greatly appreciated.
Thanks in advance
PiseyPeng
Mysql connection
Moderator: General Moderators
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact: