Hi, Im trying to make a form to insert data into my database and im getting
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING .... update.php on line 13
I have 2 files, test.php with the form, and update.php with the connecting info and stuff
I followed the instructions on
http://teamtutorials.com/web-development-tutorials/php-tutorials/inserting-data-into-a-mysql-database-using-php
but im not sure where my error is, this is my form
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>update database</title>
</head>
<body>
<form method="post" action="update.php">
Nombre: <br>
<input type="text" name="fname" size="30"/><br>
Colonia: <br>
<input type="text" name="lname" size="30"/><br>
Numero: <br>
<input type="text" name="country" size="30"/><br>
Type: <br>
<input type="text" name="type" size="30"/><br>
Dirección: <br>
<input type="text" name="address" size="30"/><br>
<input type="submit" value="Agregar Restaurante" />
</form>
</body>
</html>
and heres my php
<?php
$fname = $_POST['fname'];
$fname = $_POST['lname'];
$country = $_POST['country'];
$type = $_POST['type'];
$address = $_POST['address'];
mysql_connect("domain", "user","password") or die ('Error: ' . mysql_error());
mysql_select_db("dlusionz_test");
$query="INSERT INTO test_user_data (UID, fname, lname, country, type, address) VALUES ('NULL','".$fname."','".$lname."', '".$country."','".$type."','".$faddress."')";
mysql_query($query) or die ('Error');
echo "Database updated with: " . ".$fname.";
?>
I have 8 fields in that table and want to update 6 of them
any help would be appreciated,
thanks!!