How to connect database using php program? mga expert i need ur advice..
How to connect database using php program? mga expert i need ur advice..
Up na imong Apache, PHP and MySql setup?
I think it's better to read a book and follow examples in there, this is so basic! If you have problems with what you have made, come back here and ask for help about it, with the configurations, codes, errors, etc...
-
no one can help you if you can't help yourself. hihih![]()
google it..... or go to php documentations....
bro. musta?
<?php
//start session : this is optional
session_start();
$host="localhost"; //host server
$user="root"; //username of the server
$pass=""; //password for the server
//connect to your database
$db = mysql_pconnect($host,$user,$pass) or die("Can't Connect to Database");
//Select database
mysql_select_db("database_name");
?>
hope it helps.
FREE job post at cebujobline.com
CORRECTIONS:
session_start() and database connection ARE NOT RELATED.
session_start() <-- are only used for maintaining user/browser temporary information... e.g. Login info.
dli pa ko kamao sa mysql query pero u gave me the hint aw hinay2x lang ko self study ani..
Similar Threads |
|