yo ..just put the source code here ...and we can give you an advice !
Tablename= The name of your table , i think is not "tablename ", i think is accounts or smth like this,
Table1 = Username , i think is not "table1", is user/username.
Table1 = Password , and i think too is not "table2" , is "password"/"pass"
and i think should be :
Code:
if(isset($_POST['submit']))
{
if(!empty($_POST['username']))
{
if(!empty($_POST['pass']))
{
mysql_query("INSERT INTO tablename(Table1, Table2) VALUES ('".$_POST['username']."', '".$_POST['pass']."')");
echo " Registered Succesfully";
}
else
echo "Please provide a password";
}
else
echo Please provide an username";
}
}
i think you can edit this source code with lenghts and bla bla bla ...and it should work good !
And this is html code :
Code:
<form method="post" action="register.php">
Username <input type="text" name="username" ><br />
Password <input type="text" name="pass" ><br />
<input type="submit" name="submit" value="Register">
</form>