Junior Spellweaver
- Joined
- May 5, 2012
- Messages
- 110
- Reaction score
- 10
Hi Ragezone,
Since this has to do with my development of FunCMS, I thought I could post this here.
This is just the main source of my register page, so you can't see any of the Habbo style code in this source.
Well I've got this code:
Now every time I try to test this I get the "unable to register" message.
Why isn't this working probably? Can anybody please help me?
Thanks in advanced.
Since this has to do with my development of FunCMS, I thought I could post this here.
This is just the main source of my register page, so you can't see any of the Habbo style code in this source.
Well I've got this code:
And this is the source of the action file:<form action="../data/register.php" method="post">
<table width="100%" border="0" cellspacing="2" cellpadding="2">
<tbody><tr><td width="13%" align="left" valign="middle"><strong>Username</strong></td>
<td width="2%" align="left" valign="middle">:</td>
<td width="85%" align="left" valign="middle"><label>
<input name="username" class="textbox" id="username" type="text">
</label></td>
</tr>
<tr>
<td width="13%" align="left" valign="middle"><strong>Password</strong></td>
<td width="2%" align="left" valign="middle">:</td>
<td width="85%" align="left" valign="middle"><label>
<input name="password" class="textbox" id="password" type="password">
</label></td>
</tr>
<tr>
<td align="left" valign="middle"> </td>
<td align="left" valign="middle"> </td>
<td align="left" valign="middle"><label>
<input name="register" class="submit" id="register" type="submit" value="Register">
</label></td>
</tr>
</tbody></table>
</form>
<?php
include("../data/config.php");
$username=$_POST['username'];
$password=$_POST['password'];
$query=mysql_query("INSERT INTO users` (`id`, `username`, `password`) VALUES ('', '$username', '$password')");
if($query)
{
echo '<div style="color: rgb(0, 128, 0); font-weight: bold;">Register was successfully!</div>';
}else
{
echo '<div style="color: rgb(194, 79, 0); font-weight: bold;">unable to register !!</div>';
}
?>
Now every time I try to test this I get the "unable to register" message.
Why isn't this working probably? Can anybody please help me?
Thanks in advanced.