I am trying to connect MySQL database usding PHP. If I name the file
as file.php (listing given below signature), I get following result.
> rai abc
> Fatal error: Call to undefined function: mysql_connect() in
> /var/www/html/dbd/file.php on line 6
On the other hand, if I rename it as file.php3, I don't get any error,
but I also don't get any output from `php' part of file. It give me
out put as:
> rai end
The `abc' and `output from table of MySQL database' is missing.
I am doing experimentation using RH8.
--
H.S.Rai
-----------------------------------------------
file.php
-----------------------------------------------
<html>
<body>
rai
<?php
echo "abc";
$db = mysql_connect("localhost", "root");
mysql_select_db("mydb",$db);
$result = mysql_query("SELECT * FROM employees",$db);
echo mysql_result($result,0,"first");
echo "Last Name:";
echo mysql_result($result,0,"last");
?>
end
</body>
</html>
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/linux-india-help