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 6177843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T00:20:51+00:00 2026-05-24T00:20:51+00:00

I have been on this for hours on end. When I get one thing

  • 0

I have been on this for hours on end. When I get one thing working something else doesn’t work. Well now my page is not loading to the one it is suppose to. It is loading to the content page and not the form page.I have the home page in for the users to enter in there username and passowrd and if they dont have one then they can register on the form. I put all the forms on there. I don’t know what I am doing wrong. Like I said I been working on this for hours. Can someone help me thanks.
Its not loading to the form it skips right over it to the content page. So if you click on register to the form you wont see it. It will go to the content page.
Here are my codes
This one is form page..

<?php

function FormDisplay($strMessage="**All fields are required!"){
echo "<p><strong>".$strMessage."</strong></p>\n";
echo "<form action=\"".$PHP_SELF."\" method=\"post\">\n";
echo "<table width=\"300\" cellpadding=\"2\" cellspacing=\"2\">\n";
echo "<tr>\n";
echo "  <td><strong>Username:</strong></td>\n";
echo "  <td><input type=\"text\" name=\"username\" value=\"". $_POST['username']."\"/> \n";
echo "</tr>\n";
echo "<tr>\n";
echo "<tr>\n";
echo "  <td><strong>Password:</strong></td>\n";
echo "  <td><input type=\"password\" name=\"password1\" />\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<tr>\n";
echo "  <td nowrap=\"nowrap\"><strong>Repeat Password:</strong></td>\n";
echo "  <td><input type=\"password\" name=\"password2\" /> \n";
echo "</tr>\n";
echo "<tr>\n";
echo "<tr>\n";
echo "  <td><strong>First name:</strong></td>\n";
echo "  <td><input type=\"text\" name=\"firstname\" value=\"".  $_POST['firstname']."\"/>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<tr>\n";
echo "  <td><strong>Last name:</strong></td>\n";
echo "  <td><input type=\"text\" name=\"lastname\" value=\"". $_POST['lastname']."\"/>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<tr>\n";
echo "  <td><strong>Email:</strong></td>\n";
echo "  <td><input type=\"text\" name=\"email\" value=\"". $_POST['email']."\"/>\n";
echo "</tr>\n";
echo "<tr>\n";
 echo "<tr>\n";
echo "  <td><strong>Address:</strong></td>\n";
echo "  <td><input type=\"text\" name=\"address\" value=\"". $_POST['address']."\"/>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<tr>\n";
echo "  <td><strong>City:</strong></td>\n";
echo "  <td><input type=\"text\" name=\"city\" value=\"". $_POST['city']."\"/>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<tr>\n";
echo "  <td><strong>State:</strong></td>\n";
echo "  <td><input type=\"text\" name=\"state\" value=\"". $_POST['state']."\"/>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<tr>\n";
echo "  <td><strong>Zip:</strong></td>\n";
echo "  <td><input type=\"text\" name=\"zip\" value=\"". $_POST['zip']."\"/>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<tr>\n";
echo "  <td><strong>Phone:</strong></td>\n";
echo "  <td><input type=\"text\" name=\"phone\" value=\"". $_POST['phone']."\"/>\n";
echo "</tr>\n";
echo "<tr>\n";
echo "<tr>\n";
echo "  <td>&nbsp;</td>\n";
echo "  <td><input type=\"submit\" name=\"submit\" value=\"Sign up now!\". class=\"submit\" />\n";
echo "</tr>\n";
echo "<tr>\n";
echo "</tr>\n";
echo "</table>\n";
echo "</form>\n";
 }
 if ($_POST['submit']!=""){
if ($_POST['username']==""||$_POST['password1']==""||$_POST['password2']==""||$_POST['firstname']==""||$_POST['lastname']==""||$_POST['address']==""||$_POST['email']==""||$_POST['city']==""||$_POST['state']==""||$_POST['zip']==""||$_POST['phone']=="");
$error=1;
  }
 else if ($_POST['password1']!=$_POST['password2']){
    $error=2;
  }
 else{
$hostname="localhost";
$database="Contacts";
$mysql_login="Web_User";
$mysql_password="my1230";

if (!($db = mysql_connect($hostname, $mysql_login , $mysql_password))){
    echo "error on connect";
}
else{
if (!(mysql_select_db($database,$db))){
    echo mysql_error();
    echo "<br>error on table connection";
}
else{
    $SQL="Insert into tblUsers(username,password,firstname,lastname,email,address,city,state,zip, phone,signupDate)values)'".$_POST['username']."',PASSWORD('".$_POST['password1']."'),'".$_POST['firstname']."','".$_POST['lastname']."','".$_POST['address']."','".$_POST['city']."','".$_POST['state']."','".$_POST['zip']."','".$_POST['phone']."',NOW())";
    mysql_query($SQL);
    if (is_numeric(mysql_insert_id())){
        header("Location:member-content.php?name=".$_POST['username']);
    }
    else{
        echo "Sorry, there was an error.Please try again ot contact the administrator";
    }
    mysql_close($db);//closeing out connection,done for now
  }
   }
 }

 ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
 <link rel="style.css" type="text/css" >
 <title>Members Only Framework::Signup page/title>
 </head>

 <body>
 <hr />
 <h2>Become a member of the coolest website on the net!</h2>
 <hr />
  <?php
  if ($error==1){
FormDisplay("You did not enter all required fields");
   }
 elseif ($error==2){
 FormDisplay("Your Passwords did not match");
  }
 else{
FormDisplay();
  }
 ?>
</body>
</html>

This is the signin form:

         <?php
include("config.php");
if ($_POST['username']==""|| $_POST['password']==""){
    header("Location:member-home.php?mode=1");
}
else{
    $hostname="localhost";
    $database="contacts";
    $mysql_login="Web_User";
    $mysql_password="my1230";

    if (!($db = mysql_connect($hostname, $mysql_login, $mysql_password))){
        echo "error on connect";
}
else{
    if (!(mysql_select_db($database,$db))){
    echo mysql_error();
    echo "<br>error on db connection";
    }
 }
 $SQL="Select username from tblusers where username='".$_POST['username']."' AND password=PASSWORD('".$_POST['password']."')";
 $resultSet=mysql_query($SQL);
 if (mysql_num_rows($resultSet)>0){
    $username=mysql_result($resultSet,0,"username");
    header("Location:member-content.php?name=".$username);
 }
 else{
    header("Location:member-home.php?mode=2");
    }
 }
 ?>
</body>
</html>

and this is the home:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="style.css" type="text/css">
<title>Members Only Framework::Login Page</title>
</head>

<body>
<hr />
<h3>Welcome Members!!</h3>
<hr />
 <p><a href="member-form.php">Not a member yet? Click here to join!</a></p>
<?php
if ($_GET['mode']==1){
    echo "<p style=\"color:red;\"><strong>Please enter your username and password!</strong></p>";
 }
 else if ($_GET['mode']==2){
    echo "<p style=\"color:red;\"><strong>Sorry, there is no user with that name!</strong></p>";
}
else if ($_GET['mode']==3){
    $username=$_GET['username'];
    echo "<p style=\"color:red;\"><strong>".$username.".please login using the username and password</strong></p>";
}
?>
<p>Current members enter your username and password:</p>
<form action="member-signin.php" method="post">
<table width="200" cellpadding="2" cellspacing="2">
<tr>
    <td><strong>Username:</strong></td>
    <td><input type="text" name="username" /></td>
</tr>
<tr>
    <td><strong>Password:</strong></td>
    <td><input type="password" name="password" /></td>
</tr>
<tr>
    <td>&nbsp;</td>
    <td><input type="submit" name="submit" value="Log in now!" class="submit" /></td>

</tr>
</table>
</form>
</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-24T00:20:52+00:00Added an answer on May 24, 2026 at 12:20 am

    You have a misplaced semicolon in your member-form.php:

    if ($_POST['username']==""||$_POST['password1']==""||$_POST['password2']==""||$_POST['firstname']==""||$_POST['lastname']==""||$_POST['address']==""||$_POST['email']==""||$_POST['city']==""||$_POST['state']==""||$_POST['zip']==""||$_POST['phone']=="");
    

    so you need to replace it with opening curly bracket.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been working on this for 24 hours now, trying to optimize it.
This is crazy, I have been trying for hours to get this to work.
Okay. Now I give up. I have been playing with this for hours. I
I have been staring at this code for hours now and I cannot figure
I hope you can help. This has been confounding me for hours. I have
I've been playing around with this for a couple of hours and have come
I've spent many hours trying to get this to work. And I'm getting quite
Ive been trying to get this solved for quite a few hours, but I
I have been in at the deep end for a week now learning from
I have been playing with setting up different relationships for a few hours now

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.