Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6065477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:23:41+00:00 2026-05-23T09:23:41+00:00

Yes I believe I have this done but I am getting a message that

  • 0

Yes I believe I have this done but I am getting a message that is saying Parse error: parse error, unexpected $end in C:\wamp\www\contactform.php on line 106. I look down on that line.The only think I can think of is that the else, elseif and if are wrong i been trying to switch them around to see if that makes a different. But nothing so far.

    </style>
   </head>
    <body>
    <div id="container">
    <?php
     if (isset($_POST['submit'])){
        if (trim($_POST['name'])==""){
           $strMessage="Please enter your name!";
           showForm($strMessage);
        } elseif (isset($_POST['submit'])){
               if (trim($_POST['email'])==""){
                  $strMessage="Please enter your email!";
                  showForm($strMessage);
               }
               if(isset($_POST['submit'])){
                  if (trim($_POST['username'])==""){
                      $strMessage="Please enter your username!";
                      showForm($strMessage);
                  } elseif ($_POST['pword1'] != $_POST['pword2']) {
                      $_POST['pword1'] = NULL;  // Reset the values of pword1 so it is not in the form
                      $_POST['pword2'] = NULL;  // Reset the values of pword2 so it is not in the form
                      $strMessage="Passwords do not match!";
                      showForm($strMessage);
                  } elseif (strlen(trim($_POST['pword1']))<=3){
                      $strMessage="Your password must be at least 4 characters long!";
                      showForm($strMessage);
                  } else {
                      $strMessage="Thank you, your information has been submitted. Below is the       information you sent:";
                      $strMessageBody.="Name: ".trim(stripslashes($_POST['name']))."<br />";
                      $strMessageBody.="E-mail: ".trim(stripslashes($_POST['Email']))."<br />";
                      $strMessageBody.="UserName: ".trim(stripslashes($_POST['username']))."<br />";
                      $strMessageBody.="Password: ".trim(stripslashes($_POST['pword1']))."<br />";
                      $strMessageBody.="Re-enter Password: ".trim(stripslashes($_POST['pword2']))."<br  />";
                      echo "<h1>".$strMessage."</h1>";
                      echo $strMessageBody;
                   }
               } else {
                   $strMessage= "Please fill out the form below to send your information:";
                   showForm($strMessage);
               }
            }
      ?>
   </div>
    </body>
       </html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T09:23:41+00:00Added an answer on May 23, 2026 at 9:23 am

    I believe this is what you want. You have been repeating the “if (isset($_POST[‘submit’])){” two times too many!

    if (isset($_POST['submit'])){
      if (trim($_POST['name'])==""){
        $strMessage="Please enter your name!";
        showForm($strMessage);
      } elseif (trim($_POST['email'])==""){
          $strMessage="Please enter your email!";
        showForm($strMessage);
      } elseif (trim($_POST['username'])==""){
        $strMessage="Please enter your username!";
        showForm($strMessage);
      } elseif ($_POST['pword1'] != $_POST['pword2']) {
        $_POST['pword1'] = NULL;  // Reset the values of pword1 so it is not in the form
        $_POST['pword2'] = NULL;  // Reset the values of pword2 so it is not in the form
        $strMessage="Passwords do not match!";
        showForm($strMessage);
      } elseif (strlen(trim($_POST['pword1']))<=3){
        $strMessage="Your password must be at least 4 characters long!";
        showForm($strMessage);
      } else {
        $strMessage="Thank you, your information has been submitted. Below is the       information you sent:";
        $strMessageBody.="Name: ".trim(stripslashes($_POST['name']))."<br />";
        $strMessageBody.="E-mail: ".trim(stripslashes($_POST['Email']))."<br />";
        $strMessageBody.="UserName: ".trim(stripslashes($_POST['username']))."<br />";
        $strMessageBody.="Password: ".trim(stripslashes($_POST['pword1']))."<br />";
        $strMessageBody.="Re-enter Password: ".trim(stripslashes($_POST['pword2']))."<br  />";
        echo "<h1>".$strMessage."</h1>";
        echo $strMessageBody;
      }
    } else {
      $strMessage= "Please fill out the form below to send your information:";
      showForm($strMessage);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Yes, I have searched and tried many techniques, but nothing seems to work. Here
Yes, I know this question has been asked before, but I can't find an
Yes I have a project that I'm working on in NetBeans 7.1 and I
Yes, I know this question has been asked a lot of times, but I
This is a very simple task in every language I have ever used, but
I have a problem related to parsing a SOAP message. This is the message:
I have this iPhone application that let users take a picture and save it
-I have a UIView. -This UIView has a UIButton that when clicked makes a
I have a list of items heading that are all in INTEGER (yes the
I'm getting this error: CS0246: The type or namespace name 'ManagementScope' could not be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.