Hi,
Last night I was trying to add a re type password and captcha to my registration form and it seemed okay but when I tested it failed everytime, so then I removed both features and it still failed, now it just has the re type password as I figured it didn’t cause the issue.
The PHP from my registration form:
<?php
/**
* Already logged in, cannot register
*/
if($session->logged_in){
echo "<p>We're sorry <b>$session->username</b>, but you've already registered. "
."<a href=\\"index.php\\">Main</a>.</p>";
}
/**
* The user has submitted the registration form and the
* results have been processed.
*/
else if(isset($_SESSION['regsuccess'])){
/* Registration was successful */
if($_SESSION['regsuccess']){
echo "<p>Thank you for registering <b>".$_SESSION['reguname']."</b>"
.", you may now <a href=\\"index.php\\">log in</a>.</p>";
}
/* Registration failed */
else{
echo "<h1>Registration Failed</h1>";
echo "<p>We're sorry, but an error has occurred and your registration for the username <b>".$_SESSION['reguname']."</b>, "
."could not be completed.<br>Please try again at a later time.</p>";
}
unset($_SESSION['regsuccess']);
unset($_SESSION['reguname']);
}
else{
?>
<?
if($form->num_errors > 0){
echo "<td><font size=\\"2\\" color=\\"#ff0000\\">".$form->num_errors." error(s) found</font></td>";
}
?>
<table><tr><td>
<form action="process.php" method="POST">
<table>
<tr>
<table align="left" border="0" cellspacing="0" cellpadding="3">
<tr><td>Username:</td><td><input type="text" name="user" maxlength="30" value="<? echo $form->value("user"); ?>"></td><td><? echo $form->error("user"); ?></td></tr>
<tr><td>Password:</td><td><input type="password" name="pass" maxlength="30" value="<? echo $form->value("pass"); ?>"></td><td><? echo $form->error("pass"); ?></td></tr>
<tr>
<td>Retype Password:</td>
<td><input type="password" name="pwdconfirm" maxlength="30"
value="<?php echo $form->value("pwdconfirm"); ?>"></td>
<td><?php echo $form->error("pwdconfirm"); ?></td>
</tr>
<tr><td>Email:</td><td><input type="text" name="email" maxlength="50" value="<? echo $form->value("email"); ?>"></td><td><? echo $form->error("email"); ?></td></tr>
<tr><td colspan="2" align="right">
<input type="hidden" name="subjoin" value="1">
<input type="submit" value="Join!"></td></tr>
</table>
</form>
</td></tr>
</table>
<?
}
?>
Only other thing in the doc is:
<?php
include("include/session.php");
?>
If anyone thinks it has to be in the sessions.php I’ll put the code up then.
Thanks in advance.