/ Published in: MySQL

$connect = mysql_connect("localhost:8889","root","root");
Means: server, user, pass
Means: server, user, pass
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php $connect = mysql_connect("localhost:8889","root","root"); { die('Could not connect: ' . mysql_error()); } mysql_select_db("ourDatavase", $connect); mysql_query("INSERT INTO someData (name, email, address) VALUES ('Peter', 'Griffin@gmail.com', '35 curtis way')") || die(mysql_error()); mysql_query("INSERT INTO someData (name, email, address) VALUES ('POooFace', 'pooFace@gmail.com', '33 poo way')") || die(mysql_error()); mysql_close($connect); ?>
Comments
