[Ilugc] mysql db connectivity doubt in php

  • From: raja_gilbert@xxxxxxxxxxx (gilbert raja)
  • Date: Thu, 11 Mar 2004 18:21:46 +0000 (GMT)

--0-1987589320-1079029306=:85446
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

dear sir,
 
      i'm unable to connect the mysql database into my php program. my sample 
program is :
dbconn.php
-----------------
<?php
mysql_connect("localhost","root","") or die ("unable to connect mysql");
mysql_db_select("mydb") or die ("unable to select database");
?>
 
select.php
=======
<?php
 
   include("dbconn.php");
$query("select * from employees");
'
;
;
;
;
?>
 
the output is
 
 undefined function mysql_connect.
 
i don't know the problem. i'm new to php and mysql.
i'm using RH linux 9.0, mysql 3.22 and php 4.2.2.
and apache server.
pls give me a solution to solve this problem
 
 


(@ @)
        || 
      =o0==================
     |                                              |                  
     |   "Known is Drop"                    |
     |    Unknown is Ocean"               |
     |                                              |
     |                                              |
     |                                              |
       =================0o=
Yahoo! India Insurance Special: Be informed on the best policies, services, 
tools and more.
--0-1987589320-1079029306=:85446
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

<DIV>dear sir,</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; i'm unable to connect the mysql database 
into my php program. my sample program is :</DIV>
<DIV>dbconn.php</DIV>
<DIV>-----------------</DIV>
<DIV>&lt;?php</DIV>
<DIV>mysql_connect("localhost","root","") or die ("unable to connect 
mysql");</DIV>
<DIV>mysql_db_select("mydb") or die ("unable to select database");</DIV>
<DIV>?&gt;</DIV>
<DIV>&nbsp;</DIV>
<DIV>select.php</DIV>
<DIV>=======</DIV>
<DIV>&lt;?php</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp; include("dbconn.php");</DIV>
<DIV>$query("select * from employees");</DIV>
<DIV>'</DIV>
<DIV>;</DIV>
<DIV>;</DIV>
<DIV>;</DIV>
<DIV>;</DIV>
<DIV>?&gt;</DIV>
<DIV>&nbsp;</DIV>
<DIV>the output is</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;undefined function mysql_connect.</DIV>
<DIV>&nbsp;</DIV>
<DIV>i don't know the problem. i'm new to php and mysql.</DIV>
<DIV>i'm using RH linux 9.0, mysql 3.22 and php 4.2.2.</DIV>
<DIV>and apache server.</DIV>
<DIV>pls give me a solution to solve this problem</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV><BR><BR>(@ @)<br>        || <br>      
=o0==================<br>     |                                              |  
                <br>     |   "Known is Drop"                    |<br>     |    
Unknown is Ocean"               |<br>     |                                     
         |<br>     |                                              |<br>     |   
                                           |<br>       
=================0o=<p><font face=arial size=-1>
<a 
href="http://in.rd.yahoo.com/specials/mailtag/*http://in.insurance.yahoo.com/licspecial/index.html";
 target="_blank"><b>Yahoo! India Insurance Special</a>:</b> Be informed on the 
best policies, services, tools and more.</font>
--0-1987589320-1079029306=:85446--

Other related posts: