$host="localhost"; // Host name
$db_username="root"; // Mysql username
$db_password=""; // Mysql password
$db_name="sarvdev"; // Database name
$user="user"; // Table names
mysql_connect("$host", "$db_username", "$db_password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
$sql="Select * from User where name='" .$name. "' or email='" . $email ."'";
$result=mysql_query($sql);
reff : http://zantara.blogspot.com/2011/11/code-to-select-data-from-mysql-with.html
0 comments:
Posting Komentar