This is just a testing page to make sure that I know how to insert data into the database.
This is my login page:
<?php
$mysql_host = "[HOST REMOVED]";
$mysql_database = "a8700070_test";
$mysql_user = "a8700070_admin";
$mysql_password = "[PASSWORD REMOVED]";
?>
This is the code I have for the form.
<form action="db.php" method="post">
<input name="name" type="text">
<input name="age" type="text">
<input name="title" type="text">
<input name="person" type="text">
<input name="ok" type="text">
<input name="GO!" type="submit">
</form>
and this is the code I have that inserts it into the table.
<?php //
require_once 'login.php';
$db_server= mysql_connect($mysql_host, $mysql_user, $mysql_password);
if (!$db_server) die("Unable to connect to MySQL: " . mysql_error());
mysql_select_db($mysql_database) or die("Unable to select database: " . mysql_error());
$namer = $_POST["name"];
$age = $_POST["age"];
$tit = $_POST["title"];
$k = $_POST["ok"];
$pers = $_POST["person"];
echo "$namer";
$sql="INSERT INTO test (title,person,age,date,ok)
VALUES($namer,$age,$tit,$k,$pers)"
?>
'$namer'. And you MUST MUST MUST escape them against SQL injection attacts.$namer = mysql_real_escape_string($_POST['name']);en.wikipedia.org/wiki/SQL_injection