how to connect php with mysql ?
if i want to connect php with mysql please guide
before you Connecticut. you havê to create tables mysqli_query($cn, "CREATE TABLE IF NOT EXISTS table ( id int(255) NOT NULL, PRIMARYKEY(id), )
if you speak about mysql use PDO connect, myslq_connect is deprecated. $bdd= new PDO("mysql:dbname=thedbname;host=ipServer", user, password);
you need db first. then you need sql server name. username that is privileged to the database. username password. and table name. the syntax is all very simular but may differ slightly. are you using mysqli, mysql, pdo?
$cn=mysqli_connect(server,user ID,password,database); you have to create a database first and then perform the operations