<html dir="rtl">
<head>
<title>Save your contact!</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head>
<body>
<?php
mysql_connect('localhost','root','') or die('MySQL connect error!');
mysql_select_db('mycontacts') or die('MySQL db select error!');
$full_name=$_POST['full_name'];
$password=$_POST['password'];
$repassword=$_POST['repassword'];
if($full_name and $password and $repassword)
{
$result=mysql_query("insert into contacts values('','$full_name','$password','$repassword')");
if(mysql_affected_rows()>0)
{
echo 'Register done';
}
else
{
echo 'Problem in register';
}
}
else
{
echo 'please complete all fields';
}
?>
</body>
</html>