What I wish to do is insert values into a database using a file (insert.php).
1. Is the layout of the file (see below) the proper way to do it?
2. Once the file is created, what do I do?, just put it on the server and then run the url
<?
//dbuser
$usr = "yyyyyyyy";
//dbpass
$pwd = "xxxxxxxx";
//dbname
$db = "zzzzzzzzzz";
//dbhost
$host = "localhost";
// connect to the sql database
$link = mysql_connect($server, $user, $pass);
$db = mysql_select_db($database, $link);
"insert into items values(0, 'Tony', 'Tony blah', 23.95)";
"insert into items values(0, 'FI', 'FI blah',36.50)";
?>
1. Is the layout of the file (see below) the proper way to do it?
2. Once the file is created, what do I do?, just put it on the server and then run the url
<?
//dbuser
$usr = "yyyyyyyy";
//dbpass
$pwd = "xxxxxxxx";
//dbname
$db = "zzzzzzzzzz";
//dbhost
$host = "localhost";
// connect to the sql database
$link = mysql_connect($server, $user, $pass);
$db = mysql_select_db($database, $link);
"insert into items values(0, 'Tony', 'Tony blah', 23.95)";
"insert into items values(0, 'FI', 'FI blah',36.50)";
?>