Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Programming/Scripts

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 5th February 2009, 09:35
meomike2000 meomike2000 is offline
Member
 
Join Date: Apr 2007
Posts: 39
Thanks: 14
Thanked 0 Times in 0 Posts
Question help with php5 and mysql on ubuntu lamp.

i have been using php for a short while now and am starting to add on mysql database.
i have been reading a book about using php and mysql together and i have a sample script from that book that i have linked from my home page.
when i click on the link i get this error:

Fatal error: Call to undefined function mysql_connect() in /home/mike/Desktop/web/testdatabase.php on line 7

lines 6, 7, and 8 of my code is:

//open connection to database server.
$connection = mysql_connect('localhost', 'directory', 'directory')
or die ('unable to connect!');

the server is mine (ubuntu8.04 with php5) and this is not actually on the net, just my local machine.
as i am new to this and the book dont say anything about this "function" i could use a little help.

thanks in advance mike......
Reply With Quote
Sponsored Links
 

Bookmarks

Tags
mysql, php5

Thread Tools
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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ffmpeg Video support for ubuntu 7.10 [suphp-ispconfig] amaurib Installation/Configuration 13 16th February 2010 18:26
php5 and php4 at the same time Hans Installation/Configuration 15 22nd October 2008 14:02
MySQL problem satimis Server Operation 5 25th June 2008 16:41
CentOS 4.3 - PHP5 and MySQL 5 british.assassin Installation/Configuration 4 20th June 2006 15:20
eaccelerator installation - can't find php5-config tom Programming/Scripts 9 15th May 2006 16:36


All times are GMT +2. The time now is 23:19.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.