If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > New guy having problems

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-06-04, 14:54
tm184700@ohiou. tm184700@ohiou. is offline
Registered User
 
Join Date: May 2004
Posts: 3
New guy having problems

I'm a C.S. student and my teacher has recently assigned me a linux machine that had already had MySQL installed on it. I managed to set the root password, but that's about all I've changed.

When I try to connect to the MySQL server in a web page I created I use the following command.

$connect = mysql_connect("132.235.15.134:8080", "root", "Eval11s") or
die ("Hey check connect");

However I recieve this error on my browser...

Fatal error: Call to undefined function: mysql_connect() in /var/www/html/createmovie.php on line 2

by the way, I am using the "mysql_connect" function inside the php tags.

Is there something I'm missing here?

Thanks
Tim
Reply With Quote
  #2 (permalink)  
Old 05-06-04, 17:25
Pleb Pleb is offline
Registered User
 
Join Date: May 2004
Location: UK
Posts: 2
im not amazin a mysql but this might help, the script you have it connecting to the database but then dosent know what to do with it so it thinks its undefined. try this after ... $connect = mysql_connect("132.235.15.134:8080", "root", "Eval11s") or
die ("Hey check connect");


$query = "SELECT * FROM contact order by id desc";
$result = mysql_query($query);
$numrows = mysql_num_rows($result);
echo "$row[ name of field ]":

that should display the field content or u can use the var for other things
Reply With Quote
  #3 (permalink)  
Old 05-07-04, 00:37
snorp snorp is offline
Registered User
 
Join Date: Apr 2004
Location: Europe->Sweden->Stockholm
Posts: 71
Quote:
Fatal error: Call to undefined function: mysql_connect() in /var/www/html/createmovie.php on line 2
What version of PHP are you running, and are you sure PHP is compiled with MySQL support? It is enabled by default in PHP 4 if I remember correctly, but in PHP 5. You may have to recompile PHP with the --with-mysql cofigure option.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On