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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T15:15:30+00:00 2026-05-29T15:15:30+00:00

I am using a PHP Sign-Up script provided by PHP Form Generator . There

  • 0

I am using a PHP Sign-Up script provided by PHP Form Generator. There was a lot of obsolete code so I had to go in and fix it.

My problem is, the first test user I created worked completely fine, but all other test users I create end up having an unknown Array as the password.

This is the code:

<?php
    include("http://wolffwebdesign.co.cc/php/global.inc.php");
    $errors=0;
    $error="The following errors occured while processing your form input.<ul>";
    $FirstName = mysql_real_escape_string($_POST['FirstName']);
    $MiddleInitial = mysql_real_escape_string($_POST['MiddleInitial']);
    $LastName = mysql_real_escape_string($_POST['LastName']);
    $Company = mysql_real_escape_string($_POST['Company']);
    $Email = mysql_real_escape_string($_POST['Email']);
    $Username = mysql_real_escape_string($_POST['Username']);
    $Password = $_POST['Password'];
    $resultuser = mysql_query("SELECT Username FROM members WHERE Username = '$Username'");
    $resultpass = mysql_query("SELECT Password FROM members WHERE Password = '$Password'");

    if($FirstName=="" || $LastName=="" || $Company=="" || $Email=="" || $Username=="" || $Password=="" ){
        $errors=1;
        $error.="<li>You did not enter one or more of the required fields. Please go back and try again.</li>";
    }
    if(!preg_match('/^[a-z\d_\.\-]+@([a-z\d\-]+)(?:\.(?1))+$/i',$Email)){
        $error.="<li>Invalid email address entered</li>";
        $errors=1;
    }
    $regex = '~([^A-Z0-9]+)~i'
    if(!preg_match($regex, $Username) || !preg_match($regex, $Password)) {
        $errors.="<li>Invalid Username or Password entered</li>";
        $errors=1;
    }

    if($errors==1) {
        echo $error;
    }
    if(mysql_num_rows($resultuser) == 1){
         die("<li>That Username exists already</li>");
    }
    if(mysql_num_rows($resultpass) == 1){
       die("<li>That password exists already</li>");
    }
    else{
        if($remember == 1)
            {$expire=time()+50400;
            setcookie("extendedloginwwd", $Username, $expire);
        }
        elseif($remember == 0)
            {$expire=time()+50400;
            setcookie("loginwwd", $Username, $expire);
        }
        mkdir("home/wolffweb/www/$Username", 0755);
        $where_form_is="http".($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev(strstr(strrev($PHP_SELF),"/"));
        mail( "wolffswebdesign@gmail.com", "New User Submission", "Name: $LastName, $FirstName, $MiddleInitial\nCompany: $Company\nEmail: $Email\nUsername: $Username\nPassword: $password\nFolder: $dirname\nErrors?: $error\n", "From: Sign Up <newuser@wolffwebdesign.x10.mx>" );
        $link = mysql_connect("localhost","wolffweb_admin","jl10101");
        mysql_select_db("wolffweb_users",$link);
        $query="insert into members (First_Name,Middle_Initial,Last_Name,Company,Email,Username,Password) values ('".$FirstName."','".$MiddleInitial."','".$LastName."','".$Company."','".$Email."','".$Username."','".$Password."')";
        mysql_query($query);
        $make=fopen("admin/data.dat","a");
        $to_put="";
        $to_put .= $FirstName."|".$MiddleInitial."|".$LastName."|".$Company."|".$Email."|".$Username."|".$Password."
        ";
        fwrite($make,$to_put);
    }
    ?>

This is the shown content:

<!-- This is the content of the Thank you page, be careful while changing it -->

    <h2>Thank you!</h2>

    <table width=50%>
        <tr>
            <td>
                First Name: 
            </td>
            <td>
                <?php echo $FirstName; ?>
            </td>
        </tr>
        <tr>
            <td>
                Middle Initial: 
            </td>
            <td>
                <?php echo $MiddleInitial; ?>
            </td>
        </tr>
        <tr>
            <td>
                Last Name: 
            </td>
            <td>
                <?php echo $LastName; ?>
            </td>
        </tr>
        <tr>
            <td>
                Company: 
            </td>
            <td>
                <?php echo $Company; ?>
            </td>
        </tr>
        <tr>
            <td>
                Email: 
            </td>
            <td>
                <?php echo $Email; ?>
            </td>
        </tr>
        <tr>
            <td>
                Username: 
            </td>
            <td>
                <?php echo $Username; ?>
            </td>
        </tr>
        <tr>
            <td>
                Password: 
            </td>
            <td>
                <?php echo $Password; ?>
            </td>
        </tr>
    </table>
<!-- Do not change anything below this line -->

<?php
{}
?>

If, for example, I made my password hello52 where <?php echo $Password; ?> and also in the MYSQL Database the password ends up being the word Array, which when I plug Array in to the Log In form I get an incorrect password error. My assumption is that the password ends up being some sort of random array. Is there any way to fix this?

EDITS:

The following is the form code:

<form enctype="multipart/form-data" action="http://wolffwebdesign.co.cc/php/sign-up.php" method="post">
    <table border="1" cellspacing="1" style="border-collapse: collapse" border="#000066" width="95%" cellpadding="5">
        <tr>
            <td colspan="3" bgcolor="#B5CBEF" height="17" width="100%" border="#FFFFFF" background="http://wolffwebdesign.co.cc/media/tile_back.gif">
                <p align="left" class="c1"><img border="0" src="nav_m.gif" width="8" height="8" alt="triangle"><strong>&nbsp;Sign Up&nbsp;</strong></p>
            </td>
        </tr>
        <tr>
            <td colspan="3" bgcolor="#B5CBEF" height="16" width="100%" border="#FFFFFF" background="http://wolffwebdesign.co.cc/media/tile_sub.gif">
                &nbsp;
            </td>
        </tr>
        <tr>
            <td colspan="3" bgcolor="#D6DFEF" height="16" width="100%" border="#FFFFFF">
                <p class="c2">* - Required</p>
                <p class="c2">+ - Alpha-Neumeric only(A-Z, a-z, 0-9)
            </td>
        </tr>
        <tr>
            <td height="30" width="55" bgcolor="#EFF3F7" border="#FFFFFF">
                <img border="o" src="http://wolffwebdesign.co.cc/media/bc_new.gif" width="28" height="28" alt="triangle in a blue circle"
            </td>
            <td height="30" width="189" bgcolor="#EFF3F7" border="#FFFFFF">
                <p class="c3">First Name</p>
            </td>
            <td height="30" width="294" bgcolor="#EFF3F7" border="#FFFFFF">
                <p class="c5"><input type="text" name="FirstName" size="25">*</p>
            </td>
        </tr>
        <tr>
            <td height="30" width="55" bgcolor="#EFF3F7" border="#FFFFFF">
                <img border="o" src="http://wolffwebdesign.co.cc/media/bc_new.gif" width="28" height="28" alt="triangle in a blue circle"
            </td>
            <td height="30" width="189" bgcolor="#EFF3F7" border="#FFFFFF">
                <p class="c3">Middle Initial</p>
            </td>
            <td height="30" width="294" bgcolor="#EFF3F7" border="#FFFFFF">
                <p class="c5"><input type="text" name="MiddleInitial" size="1">
            </td>
        </tr>
        <tr>
            <td height="30" width="55" bgcolor="#EFF3F7" border="#FFFFFF">
                <img border="o" src="http://wolffwebdesign.co.cc/media/bc_new.gif" width="28" height="28" alt="triangle in a blue circle"
            </td>
            <td height="30" width="189" bgcolor="#EFF3F7" border="#FFFFFF">
                <p class="c3">Last Name</p>
            </td>
            <td height="30" width="294" bgcolor="#EFF3F7" border="#FFFFFF">
                <p class="c5"><input type="text" name="LastName" size="25">*</p>
            </td>
        </tr>
        <tr>
            <td height="30" width="55" bgcolor="#EFF3F7" border="#FFFFFF">
                <img border="o" src="http://wolffwebdesign.co.cc/media/bc_new.gif" width="28" height="28" alt="triangle in a blue circle"
                                </td>
            <td height="30" width="189" bgcolor="#EFF3F7" border="#FFFFFF">
                <p class="c3">Company</p>
            </td>
            <td height="30" width="294" bgcolor="#EFF3F7" border="#FFFFFF">
                <p class="c5"><input type="text" name="Company" size="25">*</p>
            </td>
        </tr>
        <tr>
            <td height="30" width="55" bgcolor="#EFF3F7" border="#FFFFFF">
                <img border="o" src="http://wolffwebdesign.co.cc/media/bc_new.gif" width="28" height="28" alt="triangle in a blue circle"
            </td>
            <td height="30" width="189" bgcolor="#EFF3F7" border="#FFFFFF">
                <p class="c3">Email</p>
            </td>
            <td height="30" width="294" bgcolor="#EFF3F7" border="#FFFFFF">
                <p class="c5"><input type="text" name="Email" size="25">*</p>
            </td>
        </tr>
        <tr>
            <td height="30" width="55" bgcolor="#EFF3F7" border="#FFFFFF">
                <img border="o" src="http://wolffwebdesign.co.cc/media/bc_new.gif" width="28" height="28" alt="triangle in a blue circle"
            </td>
            <td height="30" width="189" bgcolor="#EFF3F7" border="#FFFFFF">
                <p class="c3">Username</p>
            </td>
            <td height="30" width="294" bgcolor="#EFF3F7" border="#FFFFFF">
                <p class="c5"> input type="text" name="Username" size="20">*+</p>
            </td>
        </tr>
        <tr>
            <td height="30" width="55" bgcolor="#EFF3F7" border="#FFFFFF">
                <img border="o" src="http://wolffwebdesign.co.cc/media/bc_new.gif" width="28" height="28" alt="triangle in a blue circle"
            </td>
            <td height="30" width="189" bgcolor="#EFF3F7" border="#FFFFFF">
                <p class="c3">Password</p>
            </td>
            <td height="30" width="294" bgcolor="#EFF3F7" border="#FFFFFF">
                <p class="c5"> input type="password" name="Password" size="10">*+</p>
            </td>
        </tr>
        <tr>
            <td colspan="3" bgcolor="#B5CBEF" height="25" width="538" background="tile_sub.gif">
                <p align="center"><p class="c3"><input type="submit" value="Submit Form">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <input type="reset" value="Reset Form"></font>
            </td>
        </tr>
        </table>
</form>

Also I am using the mkdir() function because I want each user to have their own directory which contains a service page, the directory is not being created, is there any way to fix this?
Thanks
–James

  • 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-29T15:15:31+00:00Added an answer on May 29, 2026 at 3:15 pm
    if(!preg_match('~([^A-Z0-9]+)~i', $Username, $Password)) {
        $errors.="<li>Invalid Username or Password entered</li>";
        $errors=1;
    }
    

    The above code passes an array of preg_match('~([^A-Z0-9]+)~i', $Username) to $Password

    Try:

    $regex = '~([^A-Z0-9]+)~i'
    if(!preg_match($regex, $Username) || !preg_match($regex, $Password)) {
        $errors.="<li>Invalid Username or Password entered</li>";
        $errors=1;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to sign in to a service (site) using PHP (without using its
I have a PHP engine login page which i want to sign in using
Hey guys, I have this sign up script and I'm using mysql_real_escape_string .I know
Hi Im using jQuery's validate (awesome) script to validate a small form. It is
I am using an html sign up form for a website I'm building. The
How would one sign an outgoing email using PHP? The proper header I am
i'm using php curl's proxy feature to sign in to a site. I wanna
i've just made a sign script for my website. The form posts the data
I'm trying to write a sign up form using CodeIgniter and want to use
My problem is this. I'm setting a cookie using java script, which contains value

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.