Hi,
This is my first post.I just starting php Hope everyone reply me as possible as.
I have signup problem.When i filled the form and click sign up button then it nothing show any result i mean its not home.php "welcome" message and also not store date in my mysql bd.
here is the code:
<html>
<head>this is sign up page</head>
<body>
<form action="jhome.php" method="POST"><center>
Username:
<input type="text" name="username" id="username"/><br /><br />
Password:
<input type="password" name="password" id="password"/><br /><br />
Email:
<input type="text" name="email" id="email"/><br /><br />
<input type="submit" name="submit" value="Sign Up"/>
</center>
</form>
</body>
</html>
<?php
$connect=mysql_connect('localhost','root','');
$mysql_db=mysql_select_db('my_database',$con) or die(mysql_error());
if(isset($_POST['submit'])){
$name=$_POST['username']; **row name:username**
$password=$_POST['password']; **row name:password**
$email=$_POST['email']; **rowname:email**
if($name=='')
{
echo "<script>alart('Please Enter your name')</script>";
}
if($password=='')
{
echo "<script>alart('Please Enter your password')</script>";
}
if($email=='')
{
echo "<script>alart('Please Enter your Email')</script>";
}
else
{
$query="insert into 'user_reg'(username,password,email) values('$name','$password','$email')";
if(mysql_query($query)){
echo "<script>window.php('jhom.php','_self')</script>";
}
}
}
?>