Hi all how do I get
[php] <?php
// Read in what the user entered in the form field called “name” into the variable $name
$name = $_POST[“name”];
$type = $_POST[“type”];
$description = $_POST[“description”];
echo “
Hello you searched for $name!
”;echo “
Hello you searched for $type!
”;echo “
Hello you searched for $description!
”;$conn = mysql_connect(“localhost”, “root”);
mysql_select_db(“aanwar1”);
$result = mysql_query (“select * from places where name=’$name’ type=’$type’ and ‘$description=’$description’”);
foreach($_POST[‘name’] as $row=>$name) {
$name=mysql_real_escape_string($_POST[‘name’][$row]);
$type=mysql_real_escape_string($_POST[‘type’][$row]);
$description=mysql_real_escape_string($_POST[‘description’][$row]);
foreach($_POST[‘type’] as $row=>$type) {
$name=mysql_real_escape_string($_POST[‘name’][$row]);
$type=mysql_real_escape_string($_POST[‘type’][$row]);
$description=mysql_real_escape_string($_POST[‘description’][$row]);}
}
// now we insert it into the database
$insert = “INSERT INTO places (name, type, description)
VALUES (’”.$_POST[‘name’]."’, ‘".$_POST[‘type’]."’, ‘".$_POST[‘description’]."’)";
$add_member = mysql_query($insert);
$query = mysql_query($query);
if (!$result) {
die('Error: ’ . mysql_error());
} else {
echo “$row record added”;
}
mysql_close($conn);
?>
[/php] How to I get type and description to add to the data base? how can I then search and review places? thanks