I created a table in my database
CREATE TABLE `information` (
`ID` int(11) AUTO_INCREAMENT,
`name` varchar(50) NOT NULL,
`email` varchar(50) NOT NULL,
PRIMARY KEY (`ID`)
)
Note: I added the auto_increament thing later on
this is the code for add.php
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$con = mysql_connect("localhost","fafsd","ffasdfr");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("DB_2", $con);
$sql="INSERT INTO information(name, email)
VALUES
('.$name.','.$email.')";
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo "added!";
mysql_close($con)
?>
Problem: When I add anything to the database it shows up as two dots
Uploaded with ImageShack.us