i have been working on this for 6 hrs and i cant figure out. I took out most of the code since if i can figure out one, the rest will fall. The problem is everytime i hit the register button nothing happens
(CODE for register.php)
<?php
require_once('Functions/regfunction.php');
if(isset($_POST['submit']) && $_POST['submit'] == "Register")
{
$feedback = user_register();
}
?>
<form action="register.php" method="POST">
<table width="520" cellpadding="5" cellspacing="0">
<tr valign="bottom">
<td width="155" valign="bottom" >
<label for="q1">Display Name <span class="required">*</span></label>
</td>
<td valign="bottom">
<input type="text" size="20" name="DisplayName" value ="<?php echo $_POST['displayname']; ?>">
</td>
</tr>
</table>
<td valign="bottom">
<input type="submit" name="submit" value="Register">
</td>
</tr>
</table>
</form>
</body>
function user_register()
{
// get use ip to bring the ban hammer if needed
$userip = $_SERVER['REMOTE_ADDR'];
// will include everything from checking email synthax to encrypting passwords, pretty much all in 1 big function
global $encryptstring;
//strip invalid characters
$invalid = trim(preg_replace('/ :|\#|?/!#$%^&*()_+=-',"", strip_tags($_POST['displayname'])));
if ($invalid != $_POST['displayname'])
{
$error_message = "Invalid Characters in Display name";
return $error_message;
}
$_POST['displayname'] = $invalid;
$_POST['displayname'] = trim ($_POST['displayname']);
*/
// Can't have less than 5 Characters
if (strlen($_POST['displayname']) < 5)
{
$feedback = "Display name must be at least 6 characters";
return $feedback;
}
//Check Length of display name that did not exceed 15 characters
if (strlen($_POST['displayname']) > 15)
{
$feedback = "Display name must be less than 15 characters";
return $feedback;
}
*/
//Check if password fields match or not
if ($_POST['password'] != $_POST['passconfirm'])
{
$feedback = "Sorry,the two passwords do not match";
return $feedback;
}
//Check the length of password
if (strlen($_POST['pass']) < 5)
{
$feedback = "The password must be at least 6 characters";
return $feedback;
}
//Confirm Email fields match or not
if ($_POST['email'] != $_POST ['emailconfirm'])
{
$feedback ="Sorry, the two emails do not match";
return $feedback;
}
}
so what could be the problem, i do not get any synthax errors or anything at all. Everytime i hit the register button nothing happens so i have no diea. My code is alot longer than what i showed but if i can make something work everything else should fall into place