+ 1
how to connect php with mysql ?
if i want to connect php with mysql please guide
4 ответов
+ 3
before you Connecticut. you havê to create tables
mysqli_query($cn, "CREATE TABLE IF NOT EXISTS table (
id int(255) NOT NULL,
PRIMARYKEY(id),
)
+ 2
if you speak about mysql use PDO connect, myslq_connect is deprecated.
$bdd= new PDO("mysql:dbname=thedbname;host=ipServer", user, password);
+ 2
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?
+ 1
$cn=mysqli_connect(server,user ID,password,database);
you have to create a database first and then perform the operations