You have an error with your brackets.  Your code looks like this

 if (strlen($_POST['password1']) > 0)
{
         if ($_POST['password1'] ==($_POST['password2']
        {
              $password = TRUE;
         }

 if (strlen($_POST['password1']) > 0)
{
    if ($_POST['password1'] ==$_POST['password2'] ) <= your parenthesis here
was in the wrong place
    {
       $password = TRUE;
     }
}<= and you forgot the closing bracket

Hope that helps.

Respectfully
Ligaya Turmelle

"Erik Gjertsen" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I try to made a administrator page that I need to writ user name and
> password. But I have problem with the password. There comes one error
where
> I writ 1..(one)
> I have not made a table on MySql but in the book I read it scowl work.
> Can some one tell me why it not work.
> Here is the code:
>
> <?php # script 3.11 register.php
> if (isset($_POST['submit'])) { // Handel the form
>   // check for name
>    if (strlen($_POST['name']) > 0) {
>    $name = TRUE;
>  } else {
>    $name = FALSE;
>    echo '<p>you have forgot to enter your name</p>';
>   }
>   // check for email adress
>  if (strlen($_POST['email']) > 0) {
>   $email = TRUE;
>  } 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;
>  } 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;
>
> 1..     } 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>';
>  }
>  if ($name && $email && $username && $password)
>  { // if everyting's okayOK.
>   //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 {
>
> ?>
>
>  <form action="<?php echo
>  $_SERVER['PHP_SELF']; ?>" method="post">
>  <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 type="text" name="name" 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>
>
>  </form>
>
> Thanks fore 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