Thanks it helps
Erik Gjertsen
"Erik Gjertsen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I shall made a registration schema to user log on. But when I fill in
> everything I still com up messages that you must go back and try again.
> Or can someone help me to find a script I can use??
> I have set 1.... Where I think it is problem. The following code is
>
> <form action="<?php echo $editFormAction; ?>" method="POST" name="RegFRM"
> id="RegFRM">
>  <fieldset><legend>
> Enter your information in the form below</legend>
>  <p><b>Name:</b> <input type="text" name="name" size="20" maxlength="40"
> /></p>
>  <p><b>Email:</b> <input name="email" type="text" id="email" size="40"
> maxlength="60" />
>  </p>
>  <p><b>User name:</b> <input type="text" name="usermame" size="20"
> maxlength="40" /></p>
>  <p><b>Password:</b> <input type="password" name="password1" size="20"
> maxlength="40" /></p>
>  <p><b>Confirm Password:</b> <input type="password" name="password2"
> size="20" maxlength="40" /></p>
>  </fieldset>
>  <div align="center"> <input type="submit" name="submit" value="Submit
> information" /></div>
>         <input type="hidden" name="MM_insert" value="RegFRM">
> </form>
> <?php # script 3.11 register.php
>  // set the page title and include the html header.
> if (isset($_POST["submit"])) { // Handel the form
>  // check for name
>  if (strlen($_POST["name"]) > 0) {
>   $name = TRUE;
>   echo '<p>Du har sktevet inn navnet</p>';
>  } else {
>   $name = FALSE;
>   echo '<p>You have forgot to enter your name</p>';
>   }
>  // check for email adress
>  if (strlen($_POST["email"]) > 0) {
>   $email = TRUE;
>   echo '<p>Du har sktevet inn mailen din</p>';
>  } else {
>   $email = FALSE;
>   echo '<p>You have forgot to enter your email adress</p>';
>   }
>  // check for a usermame
>  if (strlen($_POST["usermame"]) > 0) {
>   $usermame = TRUE;
>   echo '<p>Du har skrevet inn brukernavnet</p>';
>  } else {
>   $usermame = FALSE;
>   echo '<p>You have forgot to enter your usermame</p>';
>   }
>
>  //check for a password and match against the comfirmed password.
>
>  if (strlen($_POST['password1']) > 0 )
>    {
>          if ($_POST['password1'] == $_POST['password2']) {
>          $password = TRUE;
>        } else {
>          $password = FALSE;
>          echo '<p>Your password did not match the confirmed
password!</p>';
>    }
>   } else {
>    $password = FALSE;
>    echo '<p>You forgot to enter your password!</p>';
>   }
>   1......if ($name && $email && $username && $password)
>   { // if everyting's okay.
>   //Register the user.
>   echo '<p>you are now register.</p>';
>   } else { //Something is not TRUE.
>   echo '<p>Please go back and try again.</p>';
>   }
>  } else {// Display the form
>  }
>  ?>
> </body>
>
>
> Thanks for any help
> Erik Gjertsen

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to