[x] Welcome to LinuxSolved.com Linux help forums, here we are a community of Linux users helping each other. It is helpful to both ie. new linux users as well experienced one. We always have our experts to help you and ofcourse members help each other, so you can ask for help any time by Registering.: Click to Register

Welcome, Guest. Please login or register.
Did you miss your activation email?


Login with username, password and session length

Linux Forums - Linux Help,Advice & support community:LinuxSolved.com  |  Forum  |  Others  |  Miscellaneous  |  Topic: php script not working
The LinuxSolved.com GNU/Linux User Communit - Forum
Welcome to LinuxCommunity You have just arrived to a friendly linux community which is helping Linux Users from Years.. You can be its part if you have not already joined it. Registration is FREE and is gateway to unlimited help and support to all your linux related needs. If you are an GNU/Linux supporter then you have come to the right place.
Pages: [1]
  Print  
Author Topic: php script not working  (Read 805 times)
0 Members and 1 Guest are viewing this topic.
sekhar_vrc
Linux Noob !
*
Offline Offline

Posts: 17


View Profile
« on: October 09, 2004, 09:57:37 AM »

dear sir

               When i am trying to create a data base using php i  am encountering
the folllowing error

"Fatal error: Call to undefined function: mysql_connect()"

the script is given below (ctable.php)


<?
$user="root";
$password="xyz123";
$database="allusers";
mysql_connect(localhost,$user,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="CREATE TABLE contacts (id int(6) NOT NULL auto_increment,first varchar(15) NOT NULL,last varchar(15) NOT NULL,phone varchar(20) NOT NULL,mobile varchar(20) NOT NULL,fax varchar(20) NOT NULL,email varchar(30) NOT NULL,web varchar(30) NOT NULL,PRIMARY KEY (id),UNIQUE id (id),KEY id_2 (id))";
mysql_query($query);
mysql_close();
?>


please guide me

with regards
sekhar
Logged
Ricky
LST CareTaker
Specially Skilled
*****
Offline Offline

Gender: Male
Posts: 2173


View Profile
« Reply #1 on: October 12, 2004, 04:16:31 AM »

It seems to me that mysql is not enabled in your PHP . .you need to enable it .. check it by ..

phpinfo() directive and look for mysql is enabled or not !

if it is not there then install from the redhat installation cds ..
Logged
Linux Forums - Linux Help,Advice & support community:LinuxSolved.com
   

 Logged
Pages: [1]
  Print  
 
Jump to:  

Welcome, Guest. Please login or register.
Did you miss your activation email?
August 27, 2008, 11:26:03 PM

Login with username, password and session length
Navigation
Recent Discussions
[August 24, 2008, 05:12:53 AM]

[August 23, 2008, 04:22:52 AM]

[August 23, 2008, 04:18:27 AM]

[August 23, 2008, 04:12:11 AM]

[August 22, 2008, 01:12:07 AM]

[August 20, 2008, 10:20:08 PM]

[August 20, 2008, 07:45:14 AM]

[August 20, 2008, 06:46:01 AM]

[August 20, 2008, 02:34:39 AM]

[August 13, 2008, 06:15:18 AM]
Members
Total Members: 5983
Latest: dhekalemanisha
Stats
Total Posts: 8119
Total Topics: 2189
Online Today: 17
Online Ever: 111
(June 28, 2007, 06:47:29 AM)
Users Online
Users: 0
Guests: 9
Total: 9
Privacy Policy| Powered by SMF 1.1.4 | SMF © 2006-2007, Simple Machines LLC
Seo4Smf v0.2 © Webmaster's Talks
Theme & TinyPortal v0.9.8 © Bloc