[Help] [Req] simple registration page

lightningmu

New Member
Joined
Nov 24, 2009
Messages
24
Reaction score
0
Can any1 make a simple registration page for me??
that needs only to type username and password.
then register..

pls help me..
thnx!!
 

killar4eto

Well-Known Member
Joined
Apr 11, 2009
Messages
920
Reaction score
463
Code:
<form action='' method='POST'>
<table width='300' border=0>
<tr>
<th>Simple Registration</th>
</tr>
<tr>
<td>Username:&nbsp;<input type='text' size='15' name='user'></td>
</tr>
<tr>
<td>Password:&nbsp;<input type='password' size='15' name='pass'></td>
</tr>
<tr>
<td><input type='submit' name='reg' value='Register'></td>
</tr>
</table>
</form>
 
<?php
if(isse($_POST['reg']))
{
$user = $_POST['user'];
$pass = $_POST['pass'];
 
if((empty($user)) OR (empty($pass)))
{
echo('<script language="javascript">alert("You need to fill all fields!");</script>');
}
$username_exist = mssql_query("SELECT * FROM MEMB WHERE account='$user'");
$username_exist = mssql_num_rows($username_exist);
if($username_exist == 1)
{
$error = 1;
echo "<center>Вече има такъв потребител!</center>";
}
else
{
$import = mssql_query("INSERT INTO MEMB (account,password) VALUES ('$user','$pass')");
echo "$user has been added";
}
}
?>

Test it :)
 
  • Like
Reactions: 1ns0mn1a