please guys i need your help , i have got a database with the name of a2354076_db and i have created the table caller users with this code :
CREATE TABLE users
(
P_Id int,
username varchar(255),
pass varchar(255),
email varchar(255),
country varchar(255)
)
and then i wanted to conect my form to it but i did no know how to do it i have used this code :
<?php
if (isset($_REQUEST['name']))
$con = mysql_connect("$mysql_host","$mysql_user","$mysql_password");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("$mysql_database", $con);
INSERT INTO Persons (name, email, pass,country)
VALUES ($name, $email, $pass, $country)
echo "<form method='post' action='db.php'>
name: <input name='email' type='text' /><br />
password: <input name='pass' type='password' /><br />
country:<input type="text" name="country" /><br />
email :<input type="text" name="email" /><br />
<input type='submit' />
</form>";
$mysql_host = "mysql9.000webhost.com";
$mysql_database = "a2354076_db";
$mysql_user = "username";
$mysql_password = "*********";
$email = $_REQUEST['email'] ;
$pass = $_REQUEST['pass'] ;
$country = $_REQUEST['country'] ;
$name = $_REQUEST['name'] ;
?>
but nothing is happening so please guys correct me and give me the correct full code
please give me the code , i am really tired from writing wrong php codes .