Link to home
Start Free TrialLog in
Avatar of chefkeifer
chefkeiferFlag for United States of America

asked on

register page

I am having some issues with the registration form. I have the same fields in the database as i do in the code. its going the right database and such as well. When i click submit it moves to a blank page.


<?php
if (isset ($_POST['firstname'])){
	
	 $storename = $_POST['storename'];
     $firstname = $_POST['firstname'];
     $lastname = $_POST['lastname'];
	 $address = $_POST['address'];
     $country = $_POST['country'];
     $state = $_POST['state'];
     $city = $_POST['city'];
     $zip = $_POST['zip'];
     $website = $_POST['website'];
     $email1 = $_POST['email1'];
     $email2 = $_POST['email2'];
     $pass1 = $_POST['pass1'];
     $pass2 = $_POST['pass2'];
     $humancheck = $_POST['humancheck'];

	 $storename = stripslashes($storename);
     $firstname = stripslashes($firstname);
     $lastname = stripslashes($lastname);
	 $address = stripslashes($address);
     $state = stripslashes($state);
     $city = stripslashes($city);
     $zip = stripslashes($zip);
     $website = stripslashes($website);
     $email1 = stripslashes($email1); 
     $pass1 = stripslashes($pass1); 
     $email2 = stripslashes($email2);
     $pass2 = stripslashes($pass2); 

     $storename = strip_tags($storename);
	 $firstname = strip_tags($firstname);
	 $lastname = strip_tags($lastname);
	 $address = strip_tags($address);
     $state = strip_tags($state);
     $city = strip_tags($city);
	 $zip = strip_tags($zip);
     $website = strip_tags($website);
     $email1 = strip_tags($email1);
     $pass1 = strip_tags($pass1);
     $email2 = strip_tags($email2);
     $pass2 = strip_tags($pass2);

     // Connect to database
     include_once "../Scripts/connect_to_mysql.php";
     $emailCHecker = mysqli_real_escape_string($email1);
	 $emailCHecker = eregi_replace("`", "", $emailCHecker);
     // Database duplicate e-mail check setup for use below in the error handling if else conditionals
     $sql_email_check = mysqli_query("SELECT email FROM pages WHERE email='$emailCHecker'");
     $email_check = mysqli_num_rows($sql_email_check); 

     // Error handling for missing data
     if ((!$storename) || (!$firstname) || (!$lastname) || (!$address) || (!$country) || (!$state) || (!$city) || (!$zip) || (!$email1) || (!$email2) || (!$pass1) || (!$pass2)) { 

     $errorMsg = 'ERROR: You did not submit the following required information:<br /><br />';
  
     if(!$storename){
		$errorMsg .= ' * User Name</br>';
	 }
	 if(!$firstname){ 
       $errorMsg .= ' * First Name<br />';
     } 
	 if(!$lastname){ 
       $errorMsg .= ' * Last Name<br />';
     }
	 if(!$address){ 
       $errorMsg .= ' * Address<br />';
     }
     if(!$country){ 
       $errorMsg .= ' * Country<br />';
     } 	
	 if(!$state){ 
       $errorMsg .= ' * State or Provice<br />';      
     }
	 if(!$city){ 
       $errorMsg .= ' * City<br />';        
     } 
	 if(!$zip){ 
       $errorMsg .= ' * Postal or Zip Code<br />';        
     } 		
	 if(!$email1){ 
       $errorMsg .= ' * Email Address<br />';      
     }
	 if(!$email2){ 
       $errorMsg .= ' * Confirm Email Address<br />';        
     } 	
	 if(!$pass1){ 
       $errorMsg .= ' * Login Password<br />';      
     }
	 if(!$pass2){ 
       $errorMsg .= ' * Confirm Login Password<br />';        
     } 	
	
     } else if ($email1 != $email2) {
              $errorMsg = 'ERROR: Your Email fields below do not match<br />';
     } else if ($pass1 != $pass2) {
              $errorMsg = 'ERROR: Your Password fields below do not match<br />';
     } else if ($humancheck != "") {
              $errorMsg = 'ERROR: The Human Check field must be cleared to be sure you are human<br />';		 
     } else if ($email_check > 0){ 
              $errorMsg = "<u>ERROR:</u><br />Your Email address is already in use inside our database. Please use another.<br />"; 
	   
     } else { // Error handling is ended, process the data and add member to database
     ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	 $storename = mysqli_real_escape_string($storename);
	 $firstname = mysqli_real_escape_string($firstname);
	 $lastname = mysqli_real_escape_string($lastname);
	 $address = mysqli_real_escape_string($address);
     $state = mysqli_real_escape_string($state);
     $city = mysqli_real_escape_string($city);
	 $zip = mysqli_real_escape_string($zip);
     $website = mysqli_real_escape_string($website);
     $email1 = mysqli_real_escape_string($email1);
     $pass1 = mysqli_real_escape_string($pass1);
	 
	 $storename - eregi_replace("`", "", $storename);
	 $firstname = eregi_replace("`", "", $firstname);
	 $lastname = eregi_replace("`", "", $lastname);
	 $address = eregi_replace("`", "", $address);
	 $state = eregi_replace("`", "", $state);
	 $city = eregi_replace("`", "", $city);
	 $zip = eregi_replace("`", "", $zip);
	 $website = eregi_replace("`", "", $website);
	 $email1 = eregi_replace("`", "", $email1);
	 $pass1 = eregi_replace("`", "", $pass1);
     $website = eregi_replace("http://", "", $website);
	 
     // Add MD5 Hash to the password variable
     $db_password = md5($pass1); 

     // Add user info into the database table for the main site table(audiopeeps.com)
     $sql = mysqli_query("INSERT INTO pages (storename, firstname, lastname, address, country, state, city, zip, email, password, sign_up_date, website) 
     VALUES('$storename','$firstname','$lastname','$address','$country','$state','$city','$zip','$email1','$db_password', now(),'$website')")  
     or die (mysqli_error());
 
     $id = mysqli_insert_id();
	 
	 // Create directory(folder) to hold each user's files(pics, MP3s, etc.)		
     mkdir("vendors/$storename", 0755);	

    //!!!!!!!!!!!!!!!!!!!!!!!!!    Email User the activation link    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    $to = "$email1";
										 
    $from = "admin@keifersdesign.com";
    $subject = "Complete The Depot at Gibson Mill.com Registration";
    //Begin HTML Email Message
    $message = "Hi $storename,

   Complete this step to activate your login identity at The Depot at Gibson Mill.

   Click the line below to activate when ready.

   http://www.keifersdesign.com/activation.php?id=$id&sequence=$db_password
   If the URL above is not an active link, please copy and paste it into your browser address bar

   Login after successful activation using your:  
   E-mail Address: $email1 
   Password: $pass1

   See you on the site!
   admin@keifersdesign.com";
   //end of message
	$headers  = "From: $from\r\n";
    $headers .= "Content-type: text\r\n";

    mail($to, $subject, $message, $headers);
	
   $msgToUser = "<h2>One Last Step - Activate through Email</h2><h4>OK $storename, one last step to verify your email identity:</h4><br />
   In a moment you will be sent an Activation link to your email address.<br /><br />
   <br />
   <strong><font color=\"#990000\">VERY IMPORTANT:</font></strong> 
   If you check your email with your host providers default email application, there may be issues with seeing the email contents.  If this happens to you and you cannot read the message to activate, download the file and open using a text editor. If you still cannot see the activation link, contact site admin and briefly discuss the issue.<br /><br />
   ";


   include_once 'msgToUser.php'; 

   exit();

   } // Close else after duplication checks

} else { // if the form is not posted with variables, place default empty variables
	  
	  $errorMsg = "Fields marked with an [ * ] are required";
	  $storename = "";
	  $firstname = "";
	  $lastname = "";
	  $address = "";
	  $country = "";
	  $state = "";
	  $city = "";
	  $zip = "";
	  $website = "";
	  $email1 = "";
	  $email2 = "";
	  $pass1 = "";
	  $pass2 = "";
}

?>

Open in new window

Avatar of animesxplosion
animesxplosion


<?php
if (isset ($_POST['firstname'])){
        
         $storename = $_POST['storename'];
     $firstname = $_POST['firstname'];
     $lastname = $_POST['lastname'];
         $address = $_POST['address'];
     $country = $_POST['country'];
     $state = $_POST['state'];
     $city = $_POST['city'];
     $zip = $_POST['zip'];
     $website = $_POST['website'];
     $email1 = $_POST['email1'];
     $email2 = $_POST['email2'];
     $pass1 = $_POST['pass1'];
     $pass2 = $_POST['pass2'];
     $humancheck = $_POST['humancheck'];

         $storename = stripslashes($storename);
     $firstname = stripslashes($firstname);
     $lastname = stripslashes($lastname);
         $address = stripslashes($address);
     $state = stripslashes($state);
     $city = stripslashes($city);
     $zip = stripslashes($zip);
     $website = stripslashes($website);
     $email1 = stripslashes($email1); 
     $pass1 = stripslashes($pass1); 
     $email2 = stripslashes($email2);
     $pass2 = stripslashes($pass2); 

     $storename = strip_tags($storename);
         $firstname = strip_tags($firstname);
         $lastname = strip_tags($lastname);
         $address = strip_tags($address);
     $state = strip_tags($state);
     $city = strip_tags($city);
         $zip = strip_tags($zip);
     $website = strip_tags($website);
     $email1 = strip_tags($email1);
     $pass1 = strip_tags($pass1);
     $email2 = strip_tags($email2);
     $pass2 = strip_tags($pass2);

     // Connect to database
     include_once "../Scripts/connect_to_mysql.php";
     $emailCHecker = mysqli_real_escape_string($email1);
         $emailCHecker = eregi_replace("`", "", $emailCHecker);
     // Database duplicate e-mail check setup for use below in the error handling if else conditionals
     $sql_email_check = mysqli_query("SELECT email FROM pages WHERE email='$emailCHecker'");
     $email_check = mysqli_num_rows($sql_email_check); 

     // Error handling for missing data
     if ((!$storename) || (!$firstname) || (!$lastname) || (!$address) || (!$country) || (!$state) || (!$city) || (!$zip) || (!$email1) || (!$email2) || (!$pass1) || (!$pass2)) { 

     $errorMsg = 'ERROR: You did not submit the following required information:<br /><br />';
  
     if(!$storename){
                $errorMsg .= ' * User Name</br>';
         }
         if(!$firstname){ 
       $errorMsg .= ' * First Name<br />';
     } 
         if(!$lastname){ 
       $errorMsg .= ' * Last Name<br />';
     }
         if(!$address){ 
       $errorMsg .= ' * Address<br />';
     }
     if(!$country){ 
       $errorMsg .= ' * Country<br />';
     }  
         if(!$state){ 
       $errorMsg .= ' * State or Provice<br />';      
     }
         if(!$city){ 
       $errorMsg .= ' * City<br />';        
     } 
         if(!$zip){ 
       $errorMsg .= ' * Postal or Zip Code<br />';        
     }          
         if(!$email1){ 
       $errorMsg .= ' * Email Address<br />';      
     }
         if(!$email2){ 
       $errorMsg .= ' * Confirm Email Address<br />';        
     }  
         if(!$pass1){ 
       $errorMsg .= ' * Login Password<br />';      
     }
         if(!$pass2){ 
       $errorMsg .= ' * Confirm Login Password<br />';        
     }  
        
     } else if ($email1 != $email2) {
              $errorMsg = 'ERROR: Your Email fields below do not match<br />';
     } else if ($pass1 != $pass2) {
              $errorMsg = 'ERROR: Your Password fields below do not match<br />';
     } else if ($humancheck != "") {
              $errorMsg = 'ERROR: The Human Check field must be cleared to be sure you are human<br />';                 
     } else if ($email_check > 0){ 
              $errorMsg = "<u>ERROR:</u><br />Your Email address is already in use inside our database. Please use another.<br />"; 
           
     } else { // Error handling is ended, process the data and add member to database
     ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
         $storename = mysqli_real_escape_string($storename);
         $firstname = mysqli_real_escape_string($firstname);
         $lastname = mysqli_real_escape_string($lastname);
         $address = mysqli_real_escape_string($address);
     $state = mysqli_real_escape_string($state);
     $city = mysqli_real_escape_string($city);
         $zip = mysqli_real_escape_string($zip);
     $website = mysqli_real_escape_string($website);
     $email1 = mysqli_real_escape_string($email1);
     $pass1 = mysqli_real_escape_string($pass1);
         
         $storename - eregi_replace("`", "", $storename);
         $firstname = eregi_replace("`", "", $firstname);
         $lastname = eregi_replace("`", "", $lastname);
         $address = eregi_replace("`", "", $address);
         $state = eregi_replace("`", "", $state);
         $city = eregi_replace("`", "", $city);
         $zip = eregi_replace("`", "", $zip);
         $website = eregi_replace("`", "", $website);
         $email1 = eregi_replace("`", "", $email1);
         $pass1 = eregi_replace("`", "", $pass1);
     $website = eregi_replace("http://", "", $website);
         
     // Add MD5 Hash to the password variable
     $db_password = md5($pass1); 

     // Add user info into the database table for the main site table(audiopeeps.com)
     $sql = mysqli_query("INSERT INTO pages (storename, firstname, lastname, address, country, state, city, zip, email, password, sign_up_date, website) 
     VALUES('$storename','$firstname','$lastname','$address','$country','$state','$city','$zip','$email1','$db_password', now(),'$website')")  
     or die (mysqli_error());
 
     $id = mysqli_insert_id();
         
         // Create directory(folder) to hold each user's files(pics, MP3s, etc.)                
     mkdir("vendors/$storename", 0755); 

    //!!!!!!!!!!!!!!!!!!!!!!!!!    Email User the activation link    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    $to = "$email1";
                                                                                 
    $from = "admin@keifersdesign.com";
    $subject = "Complete The Depot at Gibson Mill.com Registration";
    //Begin HTML Email Message
    $message = "Hi $storename,

   Complete this step to activate your login identity at The Depot at Gibson Mill.

   Click the line below to activate when ready.

   http://www.keifersdesign.com/activation.php?id=$id&sequence=$db_password
   If the URL above is not an active link, please copy and paste it into your browser address bar

   Login after successful activation using your:  
   E-mail Address: $email1 
   Password: $pass1

   See you on the site!
   admin@keifersdesign.com";
   //end of message
        $headers  = "From: $from\r\n";
    $headers .= "Content-type: text\r\n";

    mail($to, $subject, $message, $headers);
        
   $msgToUser = "<h2>One Last Step - Activate through Email</h2><h4>OK $storename, one last step to verify your email identity:</h4><br />
   In a moment you will be sent an Activation link to your email address.<br /><br />
   <br />
   <strong><font color=\"#990000\">VERY IMPORTANT:</font></strong> 
   If you check your email with your host providers default email application, there may be issues with seeing the email contents.  If this happens to you and you cannot read the message to activate, download the file and open using a text editor. If you still cannot see the activation link, contact site admin and briefly discuss the issue.<br /><br />
   ";


   include_once 'msgToUser.php'; 

   exit();

   } // Close else after duplication checks

} else { // if the form is not posted with variables, place default empty variables
          
          $errorMsg = "Fields marked with an [ * ] are required";
          $storename = "";
          $firstname = "";
          $lastname = "";
          $address = "";
          $country = "";
          $state = "";
          $city = "";
          $zip = "";
          $website = "";
          $email1 = "";
          $email2 = "";
          $pass1 = "";
          $pass2 = "";
}

echo $errorMsg;
?>

Open in new window

Avatar of chefkeifer

ASKER

is the echo $errorMsg what you added to that code...just curious

i copy and pasted the code and its still is doing the same thing..submit and goes to a white page...
here is an screen shot of what is in the database..maybe i am missing something

database.png
@chefkeifer: Where the browser goes when you click submit is controlled by the action script in the form statement.  Can you please post the form so we can see that?  Then we can help with some debugging steps.  Thanks, ~Ray
here you go thanks
<!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" />
<title>The Depot at Gibson Mill</title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-image: url(../images/brick.png);
	background-repeat: repeat;
}
object {
   outline:none;
}
a:link {
	color: #FFA;
	text-decoration: none;
}
a:visited {
	text-decoration: none;
}
a:hover {
	text-decoration: underline;
	color: #FFF;
}
a:active {
	text-decoration: none;
}
a {
	font-family: Georgia, Times New Roman, Times, serif;
}

-->
</style>
<script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
</head>

<body>
<table width="888" align="center" cellpadding="6">
  <tr>
    <td align="center"><table width="100%" cellpadding="8">
      <tr>
        <td colspan="2"><table width="100%">
          <tr>
            <td colspan="2" valign="middle"><object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="900" height="215">
              <param name="movie" value="../header_TDG.swf" />
              <param name="quality" value="high" />
              <param name="wmode" value="transparent" />
              <param name="swfversion" value="6.0.65.0" />
              <param name="expressinstall" value="Scripts/expressInstall.swf" />
              <object type="application/x-shockwave-flash" data="../header_TDG.swf" width="900" height="215">
                <param name="quality" value="high" />
                <param name="wmode" value="transparent" />
                <param name="swfversion" value="6.0.65.0" />
                <param name="expressinstall" value="Scripts/expressInstall.swf" />
                <div>
                <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
                <p><a href="http://www.adobe.com/go/getflashplayer">
                <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
                  </div>
                </object>
              </object>
              </td>
            </tr>
          <tr>
            <td width="50%" valign="middle" background="../images/line.png">$logo</td>
            <td width="50%" valign="middle" background="../images/line.png">
            		<a href="../" target="_self">HOME</a>&nbsp;&nbsp;&nbsp;&nbsp;
                    <a href="../administrator/items.php" target="_self">ITEMS</a>&nbsp;&nbsp;&nbsp;&nbsp;
                    <a href="../administrator/edit_page.php" target="_self">EDIT YOUR PAGE</a>&nbsp;&nbsp;&nbsp;</td>
          </tr>
          <tr>
            <td colspan="2" valign="middle" background="../images/bkgrd.png"><!--THIS IS THE BEGINNING OF THE BROWSING FEATURE-->
            	<table width="890" align="center">     
		  			<td align="center" width="50%">
            			<form id="form1" name="form1" method="post" action="member_search.php">
			          	<p><strong>Browse Newest Vendors
            		    <input name="button" type="submit" id="button" value="Go" />
            			<input type="hidden" name="listByq" value="newest_members" />
			          	</strong></p>	
            			</form>          
        			</td>
        	        <td align="center" width="50%">
            			<form id="form3" name="form3" method="post" action="member_search.php">
			          	<p><strong>Search By Name
						<input type="text" name="fname" id="fname" />
            			<input name="button3" type="submit" id="button3" value="Go" />
			          	<input type="hidden" name="listByq" value="by_firstname" />
          				</strong></p>  
			        	</form>
        			</td>
          		</table>
            </td><!--THIS IS THE END OF TEH BROWSING SECTION -->
            </tr>
          </table>
          </td>
      </tr>
      <tr>
        <td width="20%" align="left" valign="top" background="../images/bkgrd.png" >
        	<h3 align="center"><u>Vendor List</u></h3>
			<?php echo $menuDisplay; ?></td>
        <td width="60%" align="left" background="../images/bkgrd.png" >
        	<table width="700" align="center" cellpadding="5">
        	<form action="register.php" method="post" enctype="multipart/form-data">
          	<tr>
            <td width="138" class="style7"><div align="center" class="maroon"><strong>Please Do First &rarr;</strong></div></td>
            <td width="434">Add <a href="mailto:kroberts@keifersbbq.com"><u>admin@keifersdesign.com</u></a> to your email white 				             list or safe sender list now, or else you might not get the activation email that is necessary for logging in successfully. </td>
            </tr>
            <tr>
            <td colspan="2"><font color="#FF0000"><?php print "$errorMsg"; ?></font></td>
          	</tr>
          	<tr>
            
            <td align="right"><strong><span class="maroon">Store Name:</span></strong><span class="brightRed">*</span></td>
            <td><input name="storename" type="text" class="formFields" id="storename" value="
				<?php print "$storename"; ?>" size="32" maxlength="20" /></td>
          	</tr>
          	<tr>
            
            <td align="right"><strong><span class="maroon">First Name:</span></strong><span class="brightRed">*</span></td>
            <td><input name="firstname" type="text" class="formFields" id="firstname" value="
				<?php print "$firstname"; ?>" size="32" maxlength="20" /></td>
          	</tr>
          	
            <tr>
            <td align="right" class="maroon"><strong><strong><span class="maroon">Last Name:<span class="brightRed">*</span></strong></td>
            <td><input name="lastname" type="text" class="formFields" id="lastname" value="
				<?php print "$lastname"; ?>" size="32" maxlength="20"/></td>
          	</tr>
          	
            <tr>
            <td align="right"><strong><span class="maroon">Address:</span></strong><span class="brightRed">*</span></td>
            <td><input name="address" type="text" class="formFields" id="address" value="
			<?php print "$address"; ?>" size="32" maxlength="50" /></td>
          	</tr>                    
          
          	<tr>
            <td align="right"><strong><span class="maroon">Country:</span></strong><span class="brightRed">*</span></td>
            <td>
              <select name="country" class="formFields">
                <option value="<?php print "$country"; ?>"><?php print "$country"; ?></option>
                <option value="United States of America">United States of America</option>
                <option value="Canada">Canada</option>
                <option value="Virgin Islands (Brit)">Virgin Islands Brit</option>
                <option value="Virgin Islands (USA)">Virgin Islands USA</option>
              </select>
            </td>
          	</tr>
          	
            <tr>
            <td align="right"><strong><span class="maroon">State/Province:</span></strong><span class="brightRed">*</span></td>
            <td><input name="state" type="text" class="formFields" id="state" value="
				<?php print "$state"; ?>" size="32" maxlength="36" /></td>
          	</tr>
          	
            <tr>
            <td align="right"><strong class="maroon">City:</strong><span class="brightRed">*</span></td>
            <td><input name="city" type="text" class="formFields" id="city" value="
				<?php print "$city"; ?>" size="32" maxlength="36" /></td>
          	</tr>
          	
            <tr>
            <td align="right"><strong><span class="maroon">Postal / Zip Code:</span></strong><span class="brightRed">*</span></td>
            <td><input name="zip" type="text" class="formFields" id="zip" value="
				<?php print "$zip"; ?>" size="32" maxlength="24" /></td>
          	</tr>
          	
            <tr>
            <td align="right"><strong class="maroon">Website:</strong></td>
            <td><strong>http://</strong>
            <input name="website" type="text" class="formFields" id="website" value="
				<?php print "$website"; ?>" size="40" maxlength="88" /></td>
          	</tr>          
          	
            <tr>
              <td align="right"><strong><span class="maroon">Email Address:</span></strong><span class="brightRed">*</span></td>
              <td><input name="email1" type="text" class="formFields" id="email1" value="
				<?php print "$email1"; ?>" size="32" maxlength="48" /></td>
            </tr>
          	
            <tr>
            <td align="right"><strong><span class="maroon">Confirm Email:</span></strong><span class="brightRed">*</span></td>
            <td><input name="email2" type="text" class="formFields" id="email2" value="
				<?php print "$email2"; ?>" size="32" maxlength="48" /></td>
          	</tr>
          	
            <tr>
            <td align="right"><strong><span class="maroon">Create Password:</span></strong><span class="brightRed">*</span></td>
            <td><input name="pass1" type="password" class="formFields" id="pass1" maxlength="16" />
              <span class="textSize_9px"><span class="greyColor">Alphanumeric Characters Only</span></span></td>
          	</tr>
          	
            <tr>
            <td align="right"><strong><span class="maroon">Confirm Password:</span></strong><span class="brightRed">*</span></td>
            <td><input name="pass2" type="password" class="formFields" id="pass2" maxlength="16" />
            <span class="textSize_9px"><span class="greyColor">Alphanumeric Characters Only</span></span></td>
          	</tr>
          	
            <tr>
            <td align="right"><br />
              <strong><span class="maroon">Human Check</span></strong>:<span class="brightRed">*</span></td>
            <td><br />
            <input name="humancheck" type="text" class="formFields" id="humancheck" value="Please remove all of this text" size="38" 
            maxlength="32" />
            </td>
          	</tr>
          	
            <tr>
            <td>&nbsp;</td>
            <td><p><br />
            <input type="submit" name="Submit3" value="Submit Form" />
            </p></td>
          	</tr>
        	</form>
      		</table>
        </td>
        </tr>
    </table>
    <?php echo $footer; ?></td>
  </tr>
</table>
<script type="text/javascript">
<!--
swfobject.registerObject("FlashID");
//-->
</script>
</body>
</html>

Open in new window

I replace "mysqli_query" by "mysql_query"

<?php
if (isset ($_POST['firstname'])){
       
         $storename = $_POST['storename'];
     $firstname = $_POST['firstname'];
     $lastname = $_POST['lastname'];
         $address = $_POST['address'];
     $country = $_POST['country'];
     $state = $_POST['state'];
     $city = $_POST['city'];
     $zip = $_POST['zip'];
     $website = $_POST['website'];
     $email1 = $_POST['email1'];
     $email2 = $_POST['email2'];
     $pass1 = $_POST['pass1'];
     $pass2 = $_POST['pass2'];
     $humancheck = $_POST['humancheck'];

         $storename = stripslashes($storename);
     $firstname = stripslashes($firstname);
     $lastname = stripslashes($lastname);
         $address = stripslashes($address);
     $state = stripslashes($state);
     $city = stripslashes($city);
     $zip = stripslashes($zip);
     $website = stripslashes($website);
     $email1 = stripslashes($email1);
     $pass1 = stripslashes($pass1);
     $email2 = stripslashes($email2);
     $pass2 = stripslashes($pass2);

     $storename = strip_tags($storename);
         $firstname = strip_tags($firstname);
         $lastname = strip_tags($lastname);
         $address = strip_tags($address);
     $state = strip_tags($state);
     $city = strip_tags($city);
         $zip = strip_tags($zip);
     $website = strip_tags($website);
     $email1 = strip_tags($email1);
     $pass1 = strip_tags($pass1);
     $email2 = strip_tags($email2);
     $pass2 = strip_tags($pass2);

     // Connect to database
     include_once "../Scripts/connect_to_mysql.php";
     $emailCHecker = mysqli_real_escape_string($email1);
         $emailCHecker = eregi_replace("`", "", $emailCHecker);
     // Database duplicate e-mail check setup for use below in the error handling if else conditionals
     $sql_email_check = mysql_query("SELECT email FROM pages WHERE email='$emailCHecker'");
     $email_check = mysqli_num_rows($sql_email_check);

     // Error handling for missing data
     if ((!$storename) || (!$firstname) || (!$lastname) || (!$address) || (!$country) || (!$state) || (!$city) || (!$zip) || (!$email1) || (!$email2) || (!$pass1) || (!$pass2)) {

     $errorMsg = 'ERROR: You did not submit the following required information:<br /><br />';
 
     if(!$storename){
                $errorMsg .= ' * User Name</br>';
         }
         if(!$firstname){
       $errorMsg .= ' * First Name<br />';
     }
         if(!$lastname){
       $errorMsg .= ' * Last Name<br />';
     }
         if(!$address){
       $errorMsg .= ' * Address<br />';
     }
     if(!$country){
       $errorMsg .= ' * Country<br />';
     }  
         if(!$state){
       $errorMsg .= ' * State or Provice<br />';      
     }
         if(!$city){
       $errorMsg .= ' * City<br />';        
     }
         if(!$zip){
       $errorMsg .= ' * Postal or Zip Code<br />';        
     }          
         if(!$email1){
       $errorMsg .= ' * Email Address<br />';      
     }
         if(!$email2){
       $errorMsg .= ' * Confirm Email Address<br />';        
     }  
         if(!$pass1){
       $errorMsg .= ' * Login Password<br />';      
     }
         if(!$pass2){
       $errorMsg .= ' * Confirm Login Password<br />';        
     }  
       
     } else if ($email1 != $email2) {
              $errorMsg = 'ERROR: Your Email fields below do not match<br />';
     } else if ($pass1 != $pass2) {
              $errorMsg = 'ERROR: Your Password fields below do not match<br />';
     } else if ($humancheck != "") {
              $errorMsg = 'ERROR: The Human Check field must be cleared to be sure you are human<br />';                
     } else if ($email_check > 0){
              $errorMsg = "<u>ERROR:</u><br />Your Email address is already in use inside our database. Please use another.<br />";
           
     } else { // Error handling is ended, process the data and add member to database
     ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
         $storename = mysqli_real_escape_string($storename);
         $firstname = mysqli_real_escape_string($firstname);
         $lastname = mysqli_real_escape_string($lastname);
         $address = mysqli_real_escape_string($address);
     $state = mysqli_real_escape_string($state);
     $city = mysqli_real_escape_string($city);
         $zip = mysqli_real_escape_string($zip);
     $website = mysqli_real_escape_string($website);
     $email1 = mysqli_real_escape_string($email1);
     $pass1 = mysqli_real_escape_string($pass1);
         
         $storename - eregi_replace("`", "", $storename);
         $firstname = eregi_replace("`", "", $firstname);
         $lastname = eregi_replace("`", "", $lastname);
         $address = eregi_replace("`", "", $address);
         $state = eregi_replace("`", "", $state);
         $city = eregi_replace("`", "", $city);
         $zip = eregi_replace("`", "", $zip);
         $website = eregi_replace("`", "", $website);
         $email1 = eregi_replace("`", "", $email1);
         $pass1 = eregi_replace("`", "", $pass1);
     $website = eregi_replace("http://", "", $website);
         
     // Add MD5 Hash to the password variable
     $db_password = md5($pass1);

     // Add user info into the database table for the main site table(audiopeeps.com)
     $sql = mysql_query("INSERT INTO pages (storename, firstname, lastname, address, country, state, city, zip, email, password, sign_up_date, website) VALUES('$storename','$firstname','$lastname','$address','$country','$state','$city','$zip','$email1','$db_password', now(),'$website')")  
     or die (mysqli_error());
 
     $id = mysqli_insert_id();
         
         // Create directory(folder) to hold each user's files(pics, MP3s, etc.)                
     mkdir("vendors/$storename", 0755);

    //!!!!!!!!!!!!!!!!!!!!!!!!!    Email User the activation link    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    $to = "$email1";
                                                                                 
    $from = "admin@keifersdesign.com";
    $subject = "Complete The Depot at Gibson Mill.com Registration";
    //Begin HTML Email Message
    $message = "Hi $storename,

   Complete this step to activate your login identity at The Depot at Gibson Mill.

   Click the line below to activate when ready.

   http://www.keifersdesign.com/activation.php?id=$id&sequence=$db_password
   If the URL above is not an active link, please copy and paste it into your browser address bar

   Login after successful activation using your:  
   E-mail Address: $email1
   Password: $pass1

   See you on the site!
   admin@keifersdesign.com";
   //end of message
        $headers  = "From: $from\r\n";
    $headers .= "Content-type: text\r\n";

    mail($to, $subject, $message, $headers);
       
   $msgToUser = "<h2>One Last Step - Activate through Email</h2><h4>OK $storename, one last step to verify your email identity:</h4><br />
   In a moment you will be sent an Activation link to your email address.<br /><br />
   <br />
   <strong><font color=\"#990000\">VERY IMPORTANT:</font></strong>
   If you check your email with your host providers default email application, there may be issues with seeing the email contents.  If this happens to you and you cannot read the message to activate, download the file and open using a text editor. If you still cannot see the activation link, contact site admin and briefly discuss the issue.<br /><br />
   ";


   include_once 'msgToUser.php';

   exit();

   } // Close else after duplication checks

} else { // if the form is not posted with variables, place default empty variables
         
          $errorMsg = "Fields marked with an [ * ] are required";
          $storename = "";
          $firstname = "";
          $lastname = "";
          $address = "";
          $country = "";
          $state = "";
          $city = "";
          $zip = "";
          $website = "";
          $email1 = "";
          $email2 = "";
          $pass1 = "";
          $pass2 = "";
}

echo $errorMsg;
?>
still same situation..goes to a white page and not the the msgToUser.php page..nothing goes into the database nor do i receive and email for activation..i am confused..i have used this code before...
Remove the enctype = "multipart / form-data" in form, and test
sorry...same result
here is the link to the page i am doing...maybe you can see something when you try to register yourself..i have been staring at this thing all day...

http://keifersdesign.com/administrator/register.php
Test ^^
<?php
if (isset($_POST['firstname'])){
       
     $storename = $_POST['storename'];
     $firstname = $_POST['firstname'];
     $lastname = $_POST['lastname'];
     $address = $_POST['address'];
     $country = $_POST['country'];
     $state = $_POST['state'];
     $city = $_POST['city'];
     $zip = $_POST['zip'];
     $website = $_POST['website'];
     $email1 = $_POST['email1'];
     $email2 = $_POST['email2'];
     $pass1 = $_POST['pass1'];
     $pass2 = $_POST['pass2'];
     $humancheck = $_POST['humancheck'];

     $storename = stripslashes($storename);
     $firstname = stripslashes($firstname);
     $lastname = stripslashes($lastname);
     $address = stripslashes($address);
     $state = stripslashes($state);
     $city = stripslashes($city);
     $zip = stripslashes($zip);
     $website = stripslashes($website);
     $email1 = stripslashes($email1);
     $pass1 = stripslashes($pass1);
     $email2 = stripslashes($email2);
     $pass2 = stripslashes($pass2);

     $storename = strip_tags($storename);
     $firstname = strip_tags($firstname);
     $lastname = strip_tags($lastname);
     $address = strip_tags($address);
     $state = strip_tags($state);
     $city = strip_tags($city);
     $zip = strip_tags($zip);
     $website = strip_tags($website);
     $email1 = strip_tags($email1);
     $pass1 = strip_tags($pass1);
     $email2 = strip_tags($email2);
     $pass2 = strip_tags($pass2);

     // Connect to database
     include_once "../Scripts/connect_to_mysql.php";
	 
     $emailCHecker = mysqli_real_escape_string($email1);
     $emailCHecker = eregi_replace("`", "", $emailCHecker);
     // Database duplicate e-mail check setup for use below in the error handling if else conditionals
     $sql_email_check = mysql_query("SELECT email FROM pages WHERE email='$emailCHecker'");
     $email_check = mysqli_num_rows($sql_email_check);

     // Error handling for missing data

     if ((!$storename) || (!$firstname) || (!$lastname) || (!$address) || (!$country) || (!$state) || (!$city) || (!$zip) || (!$email1) || (!$email2) || (!$pass1) || (!$pass2)) {

     $errorMsg = 'ERROR: You did not submit the following required information:<br /><br />';
 
     if(!$storename){
                $errorMsg .= ' * User Name</br>';
         }
         if(!$firstname){
       $errorMsg .= ' * First Name<br />';
     }
         if(!$lastname){
       $errorMsg .= ' * Last Name<br />';
     }
         if(!$address){
       $errorMsg .= ' * Address<br />';
     }
     if(!$country){
       $errorMsg .= ' * Country<br />';
     }  
         if(!$state){
       $errorMsg .= ' * State or Provice<br />';      
     }
         if(!$city){
       $errorMsg .= ' * City<br />';        
     }
         if(!$zip){
       $errorMsg .= ' * Postal or Zip Code<br />';        
     }          
         if(!$email1){
       $errorMsg .= ' * Email Address<br />';      
     }
         if(!$email2){
       $errorMsg .= ' * Confirm Email Address<br />';        
     }  
         if(!$pass1){
       $errorMsg .= ' * Login Password<br />';      
     }
         if(!$pass2){
       $errorMsg .= ' * Confirm Login Password<br />';        
     }  
       
     } else if ($email1 != $email2) {
              $errorMsg = 'ERROR: Your Email fields below do not match<br />';
     } else if ($pass1 != $pass2) {
              $errorMsg = 'ERROR: Your Password fields below do not match<br />';
     } else if ($humancheck != "") {
              $errorMsg = 'ERROR: The Human Check field must be cleared to be sure you are human<br />';                
     } else if ($email_check > 0){
              $errorMsg = "<u>ERROR:</u><br />Your Email address is already in use inside our database. Please use another.<br />";
           
     } else { // Error handling is ended, process the data and add member to database
     ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

 
        $storename = mysqli_real_escape_string($storename);
         $firstname = mysqli_real_escape_string($firstname);
         $lastname = mysqli_real_escape_string($lastname);
         $address = mysqli_real_escape_string($address);
     $state = mysqli_real_escape_string($state);
     $city = mysqli_real_escape_string($city);
         $zip = mysqli_real_escape_string($zip);
     $website = mysqli_real_escape_string($website);
     $email1 = mysqli_real_escape_string($email1);
     $pass1 = mysqli_real_escape_string($pass1);
         
         $storename = eregi_replace("`", "", $storename);
         $firstname = eregi_replace("`", "", $firstname);
         $lastname = eregi_replace("`", "", $lastname);
         $address = eregi_replace("`", "", $address);
         $state = eregi_replace("`", "", $state);
         $city = eregi_replace("`", "", $city);
         $zip = eregi_replace("`", "", $zip);
         $website = eregi_replace("`", "", $website);
         $email1 = eregi_replace("`", "", $email1);
         $pass1 = eregi_replace("`", "", $pass1);
     $website = eregi_replace("http://", "", $website);
         
     // Add MD5 Hash to the password variable
     $db_password = md5($pass1);
        
     // Add user info into the database table for the main site table(audiopeeps.com)
     $sql = mysql_query("INSERT INTO pages (storename, firstname, lastname, address, country, state, city, zip, email, password, sign_up_date, website) VALUES('$storename','$firstname','$lastname','$address','$country','$state','$city','$zip','$email1','$db_password', date('d/m/Y'),'$website')");

     $id = mysqli_insert_id();
         
         // Create directory(folder) to hold each user's files(pics, MP3s, etc.)                
     mkdir("vendors/$storename", 0755);

    //!!!!!!!!!!!!!!!!!!!!!!!!!    Email User the activation link    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    $to = "$email1";
                                                                                 
    $from = "admin@keifersdesign.com";
    $subject = "Complete The Depot at Gibson Mill.com Registration";
    //Begin HTML Email Message
    $message = "Hi $storename,

   Complete this step to activate your login identity at The Depot at Gibson Mill.

   Click the line below to activate when ready.

   http://www.keifersdesign.com/activation.php?id=$id&sequence=$db_password
   If the URL above is not an active link, please copy and paste it into your browser address bar

   Login after successful activation using your:  
   E-mail Address: $email1
   Password: $pass1

   See you on the site!
   admin@keifersdesign.com";
   //end of message
        $headers  = "From: $from\r\n";
    $headers .= "Content-type: text\r\n";

    mail($to, $subject, $message, $headers);
       
   $msgToUser = "<h2>One Last Step - Activate through Email</h2><h4>OK $storename, one last step to verify your email identity:</h4><br />
   In a moment you will be sent an Activation link to your email address.<br /><br />
   <br />
   <strong><font color=\"#990000\">VERY IMPORTANT:</font></strong>
   If you check your email with your host providers default email application, there may be issues with seeing the email contents.  If this happens to you and you cannot read the message to activate, download the file and open using a text editor. If you still cannot see the activation link, contact site admin and briefly discuss the issue.<br /><br />
   ";


   include_once 'msgToUser.php';

   exit();

} // Close else after duplication checks

} else { // if the form is not posted with variables, place default empty variables
         
          $errorMsg = "Fields marked with an [ * ] are required";
          $storename = "";
          $firstname = "";
          $lastname = "";
          $address = "";
          $country = "";
          $state = "";
          $city = "";
          $zip = "";
          $website = "";
          $email1 = "";
          $email2 = "";
          $pass1 = "";
          $pass2 = "";
}
?>

Open in new window

that worked...what was the deal...?
i take that back..it took it to the msgToUser.php but it did not update the database and nor send the email
I replace the function now () by date ().
and
$ storename - eregi_replace ("`", "", $ storename), for $ storename = eregi_replace ("`", "", $ storename);
could it be now that the database and the entries are not matching?
Checks if the database contains the field "country"
ok added country...
still did not work

i noticed that i  had phone, and storeDescription in the database...does it matter if you have a field in the  database but you are not adding the data from the register.php page...

here is what is in the database in the pages table
database.png
Test 2


<?php
if (isset($_POST['firstname'])){
       
     $storename = $_POST['storename'];
     $firstname = $_POST['firstname'];
     $lastname = $_POST['lastname'];
     $address = $_POST['address'];
     $country = $_POST['country'];
     $state = $_POST['state'];
     $city = $_POST['city'];
     $zip = $_POST['zip'];
     $website = $_POST['website'];
     $email1 = $_POST['email1'];
     $email2 = $_POST['email2'];
     $pass1 = $_POST['pass1'];
     $pass2 = $_POST['pass2'];
     $humancheck = $_POST['humancheck'];

     $storename = stripslashes($storename);
     $firstname = stripslashes($firstname);
     $lastname = stripslashes($lastname);
     $address = stripslashes($address);
     $state = stripslashes($state);
     $city = stripslashes($city);
     $zip = stripslashes($zip);
     $website = stripslashes($website);
     $email1 = stripslashes($email1);
     $pass1 = stripslashes($pass1);
     $email2 = stripslashes($email2);
     $pass2 = stripslashes($pass2);

     $storename = strip_tags($storename);
     $firstname = strip_tags($firstname);
     $lastname = strip_tags($lastname);
     $address = strip_tags($address);
     $state = strip_tags($state);
     $city = strip_tags($city);
     $zip = strip_tags($zip);
     $website = strip_tags($website);
     $email1 = strip_tags($email1);
     $pass1 = strip_tags($pass1);
     $email2 = strip_tags($email2);
     $pass2 = strip_tags($pass2);

     // Connect to database
     include_once "../Scripts/connect_to_mysql.php";
	 
     $emailCHecker = mysqli_real_escape_string($email1);
     $emailCHecker = eregi_replace("`", "", $emailCHecker);
     // Database duplicate e-mail check setup for use below in the error handling if else conditionals
     $sql_email_check = mysql_query("SELECT email FROM pages WHERE email='$emailCHecker'");
     $email_check = mysqli_num_rows($sql_email_check);

     // Error handling for missing data

     if ((!$storename) || (!$firstname) || (!$lastname) || (!$address) || (!$country) || (!$state) || (!$city) || (!$zip) || (!$email1) || (!$email2) || (!$pass1) || (!$pass2)) {

     $errorMsg = 'ERROR: You did not submit the following required information:<br /><br />';
 
     if(!$storename){
                $errorMsg .= ' * User Name</br>';
         }
         if(!$firstname){
       $errorMsg .= ' * First Name<br />';
     }
         if(!$lastname){
       $errorMsg .= ' * Last Name<br />';
     }
         if(!$address){
       $errorMsg .= ' * Address<br />';
     }
     if(!$country){
       $errorMsg .= ' * Country<br />';
     }  
         if(!$state){
       $errorMsg .= ' * State or Provice<br />';      
     }
         if(!$city){
       $errorMsg .= ' * City<br />';        
     }
         if(!$zip){
       $errorMsg .= ' * Postal or Zip Code<br />';        
     }          
         if(!$email1){
       $errorMsg .= ' * Email Address<br />';      
     }
         if(!$email2){
       $errorMsg .= ' * Confirm Email Address<br />';        
     }  
         if(!$pass1){
       $errorMsg .= ' * Login Password<br />';      
     }
         if(!$pass2){
       $errorMsg .= ' * Confirm Login Password<br />';        
     }  
       
     } else if ($email1 != $email2) {
              $errorMsg = 'ERROR: Your Email fields below do not match<br />';
     } else if ($pass1 != $pass2) {
              $errorMsg = 'ERROR: Your Password fields below do not match<br />';
     } else if ($humancheck != "") {
              $errorMsg = 'ERROR: The Human Check field must be cleared to be sure you are human<br />';                
     } else if ($email_check > 0){
              $errorMsg = "<u>ERROR:</u><br />Your Email address is already in use inside our database. Please use another.<br />";
           
     } else { // Error handling is ended, process the data and add member to database
     ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

 
        $storename = mysqli_real_escape_string($storename);
         $firstname = mysqli_real_escape_string($firstname);
         $lastname = mysqli_real_escape_string($lastname);
         $address = mysqli_real_escape_string($address);
     $state = mysqli_real_escape_string($state);
     $city = mysqli_real_escape_string($city);
         $zip = mysqli_real_escape_string($zip);
     $website = mysqli_real_escape_string($website);
     $email1 = mysqli_real_escape_string($email1);
     $pass1 = mysqli_real_escape_string($pass1);
         
         $storename = eregi_replace("`", "", $storename);
         $firstname = eregi_replace("`", "", $firstname);
         $lastname = eregi_replace("`", "", $lastname);
         $address = eregi_replace("`", "", $address);
         $state = eregi_replace("`", "", $state);
         $city = eregi_replace("`", "", $city);
         $zip = eregi_replace("`", "", $zip);
         $website = eregi_replace("`", "", $website);
         $email1 = eregi_replace("`", "", $email1);
         $pass1 = eregi_replace("`", "", $pass1);
     $website = eregi_replace("http://", "", $website);
         
     // Add MD5 Hash to the password variable
     $db_password = md5($pass1);
        
     // Add user info into the database table for the main site table(audiopeeps.com)
     $sql = mysql_query("INSERT INTO pages (storename, firstname, lastname, address, country, state, city, zip, email, password, sign_up_date, website) VALUES('".$storename."','".$firstname."','".$lastname."','".$address."','".$country."','".$state."','".$city."','".$zip."','".$email1."','".$db_password."', '".date('Y-d-m')."','".$website."')");

     $id = mysqli_insert_id();
         
         // Create directory(folder) to hold each user's files(pics, MP3s, etc.)                
     mkdir("vendors/$storename", 0755);

    //!!!!!!!!!!!!!!!!!!!!!!!!!    Email User the activation link    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    $to = "$email1";
                                                                                 
    $from = "admin@keifersdesign.com";
    $subject = "Complete The Depot at Gibson Mill.com Registration";
    //Begin HTML Email Message
    $message = "Hi $storename,

   Complete this step to activate your login identity at The Depot at Gibson Mill.

   Click the line below to activate when ready.

   http://www.keifersdesign.com/activation.php?id=$id&sequence=$db_password
   If the URL above is not an active link, please copy and paste it into your browser address bar

   Login after successful activation using your:  
   E-mail Address: $email1
   Password: $pass1

   See you on the site!
   admin@keifersdesign.com";
   //end of message
        $headers  = "From: $from\r\n";
    $headers .= "Content-type: text\r\n";

    mail($to, $subject, $message, $headers);
       
   $msgToUser = "<h2>One Last Step - Activate through Email</h2><h4>OK $storename, one last step to verify your email identity:</h4><br />
   In a moment you will be sent an Activation link to your email address.<br /><br />
   <br />
   <strong><font color=\"#990000\">VERY IMPORTANT:</font></strong>
   If you check your email with your host providers default email application, there may be issues with seeing the email contents.  If this happens to you and you cannot read the message to activate, download the file and open using a text editor. If you still cannot see the activation link, contact site admin and briefly discuss the issue.<br /><br />
   ";


   include_once 'msgToUser.php';

   exit();

} // Close else after duplication checks

} else { // if the form is not posted with variables, place default empty variables
         
          $errorMsg = "Fields marked with an [ * ] are required";
          $storename = "";
          $firstname = "";
          $lastname = "";
          $address = "";
          $country = "";
          $state = "";
          $city = "";
          $zip = "";
          $website = "";
          $email1 = "";
          $email2 = "";
          $pass1 = "";
          $pass2 = "";
}
?>

Open in new window

ok...same issue..goes to the msgToUser.php page just fine...no info i the database or email recieved...i did realize that it is making the directory

mkdir("vendors/$storename", 0755);

on the server for future images..just the vendor folder..did not set up a storename folder...just passing on what i see or notice...

thanks for hangin with me...
I hope this code shows the error ^ ^
<?php
if (isset($_POST['firstname'])){
       
     $storename = $_POST['storename'];
     $firstname = $_POST['firstname'];
     $lastname = $_POST['lastname'];
     $address = $_POST['address'];
     $country = $_POST['country'];
     $state = $_POST['state'];
     $city = $_POST['city'];
     $zip = $_POST['zip'];
     $website = $_POST['website'];
     $email1 = $_POST['email1'];
     $email2 = $_POST['email2'];
     $pass1 = $_POST['pass1'];
     $pass2 = $_POST['pass2'];
     $humancheck = $_POST['humancheck'];

     $storename = stripslashes($storename);
     $firstname = stripslashes($firstname);
     $lastname = stripslashes($lastname);
     $address = stripslashes($address);
     $state = stripslashes($state);
     $city = stripslashes($city);
     $zip = stripslashes($zip);
     $website = stripslashes($website);
     $email1 = stripslashes($email1);
     $pass1 = stripslashes($pass1);
     $email2 = stripslashes($email2);
     $pass2 = stripslashes($pass2);

     $storename = strip_tags($storename);
     $firstname = strip_tags($firstname);
     $lastname = strip_tags($lastname);
     $address = strip_tags($address);
     $state = strip_tags($state);
     $city = strip_tags($city);
     $zip = strip_tags($zip);
     $website = strip_tags($website);
     $email1 = strip_tags($email1);
     $pass1 = strip_tags($pass1);
     $email2 = strip_tags($email2);
     $pass2 = strip_tags($pass2);

     // Connect to database
     include_once "../Scripts/connect_to_mysql.php";
	 
     $emailCHecker = mysqli_real_escape_string($email1);
     $emailCHecker = eregi_replace("`", "", $emailCHecker);
     // Database duplicate e-mail check setup for use below in the error handling if else conditionals
     $sql_email_check = mysql_query("SELECT email FROM pages WHERE email='$emailCHecker'");
     $email_check = mysqli_num_rows($sql_email_check);

     // Error handling for missing data

     if ((!$storename) || (!$firstname) || (!$lastname) || (!$address) || (!$country) || (!$state) || (!$city) || (!$zip) || (!$email1) || (!$email2) || (!$pass1) || (!$pass2)) {

     $errorMsg = 'ERROR: You did not submit the following required information:<br /><br />';
 
     if(!$storename){
                $errorMsg .= ' * User Name</br>';
         }
         if(!$firstname){
       $errorMsg .= ' * First Name<br />';
     }
         if(!$lastname){
       $errorMsg .= ' * Last Name<br />';
     }
         if(!$address){
       $errorMsg .= ' * Address<br />';
     }
     if(!$country){
       $errorMsg .= ' * Country<br />';
     }  
         if(!$state){
       $errorMsg .= ' * State or Provice<br />';      
     }
         if(!$city){
       $errorMsg .= ' * City<br />';        
     }
         if(!$zip){
       $errorMsg .= ' * Postal or Zip Code<br />';        
     }          
         if(!$email1){
       $errorMsg .= ' * Email Address<br />';      
     }
         if(!$email2){
       $errorMsg .= ' * Confirm Email Address<br />';        
     }  
         if(!$pass1){
       $errorMsg .= ' * Login Password<br />';      
     }
         if(!$pass2){
       $errorMsg .= ' * Confirm Login Password<br />';        
     }  
       
     } else if ($email1 != $email2) {
              $errorMsg = 'ERROR: Your Email fields below do not match<br />';
     } else if ($pass1 != $pass2) {
              $errorMsg = 'ERROR: Your Password fields below do not match<br />';
     } else if ($humancheck != "") {
              $errorMsg = 'ERROR: The Human Check field must be cleared to be sure you are human<br />';                
     } else if ($email_check > 0){
              $errorMsg = "<u>ERROR:</u><br />Your Email address is already in use inside our database. Please use another.<br />";
           
     } else { // Error handling is ended, process the data and add member to database
     ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

 
        $storename = mysqli_real_escape_string($storename);
         $firstname = mysqli_real_escape_string($firstname);
         $lastname = mysqli_real_escape_string($lastname);
         $address = mysqli_real_escape_string($address);
     $state = mysqli_real_escape_string($state);
     $city = mysqli_real_escape_string($city);
         $zip = mysqli_real_escape_string($zip);
     $website = mysqli_real_escape_string($website);
     $email1 = mysqli_real_escape_string($email1);
     $pass1 = mysqli_real_escape_string($pass1);
         
         $storename = eregi_replace("`", "", $storename);
         $firstname = eregi_replace("`", "", $firstname);
         $lastname = eregi_replace("`", "", $lastname);
         $address = eregi_replace("`", "", $address);
         $state = eregi_replace("`", "", $state);
         $city = eregi_replace("`", "", $city);
         $zip = eregi_replace("`", "", $zip);
         $website = eregi_replace("`", "", $website);
         $email1 = eregi_replace("`", "", $email1);
         $pass1 = eregi_replace("`", "", $pass1);
     $website = eregi_replace("http://", "", $website);
         
     // Add MD5 Hash to the password variable
     $db_password = md5($pass1);
        
     // Add user info into the database table for the main site table(audiopeeps.com)
     $sql = mysql_query("INSERT INTO pages (storename, firstname, lastname, address, country, state, city, zip, email, password, sign_up_date, website) VALUES('".$storename."','".$firstname."','".$lastname."','".$address."','".$country."','".$state."','".$city."','".$zip."','".$email1."','".$db_password."', '".date('Y-d-m')."','".$website."')")  or die(mysql_error());
     $id = mysql_insert_id();
         
         // Create directory(folder) to hold each user's files(pics, MP3s, etc.)                
     mkdir("vendors/$storename", 0755);

    //!!!!!!!!!!!!!!!!!!!!!!!!!    Email User the activation link    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    $to = "$email1";
                                                                                 
    $from = "admin@keifersdesign.com";
    $subject = "Complete The Depot at Gibson Mill.com Registration";
    //Begin HTML Email Message
    $message = "Hi $storename,

   Complete this step to activate your login identity at The Depot at Gibson Mill.

   Click the line below to activate when ready.

   http://www.keifersdesign.com/activation.php?id=$id&sequence=$db_password
   If the URL above is not an active link, please copy and paste it into your browser address bar

   Login after successful activation using your:  
   E-mail Address: $email1
   Password: $pass1

   See you on the site!
   admin@keifersdesign.com";
   //end of message
        $headers  = "From: $from\r\n";
    $headers .= "Content-type: text\r\n";

    mail($to, $subject, $message, $headers);
       
   $msgToUser = "<h2>One Last Step - Activate through Email</h2><h4>OK $storename, one last step to verify your email identity:</h4><br />
   In a moment you will be sent an Activation link to your email address.<br /><br />
   <br />
   <strong><font color=\"#990000\">VERY IMPORTANT:</font></strong>
   If you check your email with your host providers default email application, there may be issues with seeing the email contents.  If this happens to you and you cannot read the message to activate, download the file and open using a text editor. If you still cannot see the activation link, contact site admin and briefly discuss the issue.<br /><br />
   ";


   include_once 'msgToUser.php';

   exit();

} // Close else after duplication checks

} else { // if the form is not posted with variables, place default empty variables
         
          $errorMsg = "Fields marked with an [ * ] are required";
          $storename = "";
          $firstname = "";
          $lastname = "";
          $address = "";
          $country = "";
          $state = "";
          $city = "";
          $zip = "";
          $website = "";
          $email1 = "";
          $email2 = "";
          $pass1 = "";
          $pass2 = "";
}
?>

Open in new window

getting

"No Database Selected"
is it something to do with "mysqli" and "mysql"
You are not creating a connection to the database.

check the file ".. / Scripts / connect_to_mysql.php"

if everything is correct
i have been using this for a week and up until i decided to do this register page...


<?php  
$db_host = "localhost"; 
// Place the username for the MySQL database here 
$db_username = "root";  
// Place the password for the MySQL database here 
$db_pass = "*******";  
// Place the name for the MySQL database here 
$db_name = "theDepot"; 

// Run the connection here   
$myConnection = mysqli_connect("$db_host","$db_username","$db_pass", "$db_name") or die ("could not connect to mysql");  
// Now you can use the variable $myConnection to connect in your queries      
?>

Open in new window

I think the errors have been resolved!
<?php
if (isset($_POST['firstname'])){
       
     $storename = $_POST['storename'];
     $firstname = $_POST['firstname'];
     $lastname = $_POST['lastname'];
     $address = $_POST['address'];
     $country = $_POST['country'];
     $state = $_POST['state'];
     $city = $_POST['city'];
     $zip = $_POST['zip'];
     $website = $_POST['website'];
     $email1 = $_POST['email1'];
     $email2 = $_POST['email2'];
     $pass1 = $_POST['pass1'];
     $pass2 = $_POST['pass2'];
     $humancheck = $_POST['humancheck'];

     $storename = stripslashes($storename);
     $firstname = stripslashes($firstname);
     $lastname = stripslashes($lastname);
     $address = stripslashes($address);
     $state = stripslashes($state);
     $city = stripslashes($city);
     $zip = stripslashes($zip);
     $website = stripslashes($website);
     $email1 = stripslashes($email1);
     $pass1 = stripslashes($pass1);
     $email2 = stripslashes($email2);
     $pass2 = stripslashes($pass2);

     $storename = strip_tags($storename);
     $firstname = strip_tags($firstname);
     $lastname = strip_tags($lastname);
     $address = strip_tags($address);
     $state = strip_tags($state);
     $city = strip_tags($city);
     $zip = strip_tags($zip);
     $website = strip_tags($website);
     $email1 = strip_tags($email1);
     $pass1 = strip_tags($pass1);
     $email2 = strip_tags($email2);
     $pass2 = strip_tags($pass2);

     // Connect to database
     include_once "../Scripts/connect_to_mysql.php";
	 
     $emailCHecker = mysqli_real_escape_string($email1);
     $emailCHecker = eregi_replace("`", "", $emailCHecker);
     // Database duplicate e-mail check setup for use below in the error handling if else conditionals
     $sql_email_check = mysqli_query("SELECT email FROM pages WHERE email='$emailCHecker'");
     $email_check = mysqli_num_rows($sql_email_check);

     // Error handling for missing data

     if ((!$storename) || (!$firstname) || (!$lastname) || (!$address) || (!$country) || (!$state) || (!$city) || (!$zip) || (!$email1) || (!$email2) || (!$pass1) || (!$pass2)) {

     $errorMsg = 'ERROR: You did not submit the following required information:<br /><br />';
 
     if(!$storename){
                $errorMsg .= ' * User Name</br>';
         }
         if(!$firstname){
       $errorMsg .= ' * First Name<br />';
     }
         if(!$lastname){
       $errorMsg .= ' * Last Name<br />';
     }
         if(!$address){
       $errorMsg .= ' * Address<br />';
     }
     if(!$country){
       $errorMsg .= ' * Country<br />';
     }  
         if(!$state){
       $errorMsg .= ' * State or Provice<br />';      
     }
         if(!$city){
       $errorMsg .= ' * City<br />';        
     }
         if(!$zip){
       $errorMsg .= ' * Postal or Zip Code<br />';        
     }          
         if(!$email1){
       $errorMsg .= ' * Email Address<br />';      
     }
         if(!$email2){
       $errorMsg .= ' * Confirm Email Address<br />';        
     }  
         if(!$pass1){
       $errorMsg .= ' * Login Password<br />';      
     }
         if(!$pass2){
       $errorMsg .= ' * Confirm Login Password<br />';        
     }  
       
     } else if ($email1 != $email2) {
              $errorMsg = 'ERROR: Your Email fields below do not match<br />';
     } else if ($pass1 != $pass2) {
              $errorMsg = 'ERROR: Your Password fields below do not match<br />';
     } else if ($humancheck != "") {
              $errorMsg = 'ERROR: The Human Check field must be cleared to be sure you are human<br />';                
     } else if ($email_check > 0){
              $errorMsg = "<u>ERROR:</u><br />Your Email address is already in use inside our database. Please use another.<br />";
           
     } else { // Error handling is ended, process the data and add member to database
     ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

 
        $storename = mysqli_real_escape_string($storename);
         $firstname = mysqli_real_escape_string($firstname);
         $lastname = mysqli_real_escape_string($lastname);
         $address = mysqli_real_escape_string($address);
     $state = mysqli_real_escape_string($state);
     $city = mysqli_real_escape_string($city);
         $zip = mysqli_real_escape_string($zip);
     $website = mysqli_real_escape_string($website);
     $email1 = mysqli_real_escape_string($email1);
     $pass1 = mysqli_real_escape_string($pass1);
         
         $storename = eregi_replace("`", "", $storename);
         $firstname = eregi_replace("`", "", $firstname);
         $lastname = eregi_replace("`", "", $lastname);
         $address = eregi_replace("`", "", $address);
         $state = eregi_replace("`", "", $state);
         $city = eregi_replace("`", "", $city);
         $zip = eregi_replace("`", "", $zip);
         $website = eregi_replace("`", "", $website);
         $email1 = eregi_replace("`", "", $email1);
         $pass1 = eregi_replace("`", "", $pass1);
     $website = eregi_replace("http://", "", $website);
         
     // Add MD5 Hash to the password variable
     $db_password = md5($pass1);
        
     // Add user info into the database table for the main site table(audiopeeps.com)
     $sql = mysqli_query("INSERT INTO pages (storename, firstname, lastname, address, country, state, city, zip, email, password, sign_up_date, website) VALUES('".$storename."','".$firstname."','".$lastname."','".$address."','".$country."','".$state."','".$city."','".$zip."','".$email1."','".$db_password."', '".date('Y-d-m')."','".$website."')");
     $id = mysqli_insert_id();
         
         // Create directory(folder) to hold each user's files(pics, MP3s, etc.)                
     mkdir("vendors/$storename", 0755);

    //!!!!!!!!!!!!!!!!!!!!!!!!!    Email User the activation link    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    $to = "$email1";
                                                                                 
    $from = "admin@keifersdesign.com";
    $subject = "Complete The Depot at Gibson Mill.com Registration";
    //Begin HTML Email Message
    $message = "Hi $storename,

   Complete this step to activate your login identity at The Depot at Gibson Mill.

   Click the line below to activate when ready.

   http://www.keifersdesign.com/activation.php?id=$id&sequence=$db_password
   If the URL above is not an active link, please copy and paste it into your browser address bar

   Login after successful activation using your:  
   E-mail Address: $email1
   Password: $pass1

   See you on the site!
   admin@keifersdesign.com";
   //end of message
        $headers  = "From: $from\r\n";
    $headers .= "Content-type: text\r\n";

    mail($to, $subject, $message, $headers);
       
   $msgToUser = "<h2>One Last Step - Activate through Email</h2><h4>OK $storename, one last step to verify your email identity:</h4><br />
   In a moment you will be sent an Activation link to your email address.<br /><br />
   <br />
   <strong><font color=\"#990000\">VERY IMPORTANT:</font></strong>
   If you check your email with your host providers default email application, there may be issues with seeing the email contents.  If this happens to you and you cannot read the message to activate, download the file and open using a text editor. If you still cannot see the activation link, contact site admin and briefly discuss the issue.<br /><br />
   ";


   include_once 'msgToUser.php';

   exit();

} // Close else after duplication checks

} else { // if the form is not posted with variables, place default empty variables
         
          $errorMsg = "Fields marked with an [ * ] are required";
          $storename = "";
          $firstname = "";
          $lastname = "";
          $address = "";
          $country = "";
          $state = "";
          $city = "";
          $zip = "";
          $website = "";
          $email1 = "";
          $email2 = "";
          $pass1 = "";
          $pass2 = "";
}
?>

Open in new window

man o man...back to where it goes to the msgToUser.php but nothing in the database or getting an email to activate
i have even redone the pages table in the database thinking that might some sort of issue..but to no avail...

i am thoroughly confused
should i be using the $myConnection somewhere in this code...that is the variable that is inthe connect_to_mysql.php

another thing is that I can insert information from the database and the table "pages' and SELECT anything i want...so i can connect to the database..but for some reason i cannot INSERT
Wow, what a lot of posts!  Anyway, let's try to go where the "action" is.

The form page has this on line 109:

              <form action="register.php" method="post" enctype="multipart/form-data">

Can you please post the "register.php" script in the code snippet?  Thanks, ~Ray
all that script in the past post is the script for register.php

here is is the whole thing

<?php

if (isset ($_POST['firstname'])){
	
	 $storename = $_POST['storename'];
     $firstname = $_POST['firstname'];
     $lastname = $_POST['lastname'];
	 $address = $_POST['address'];
     $country = $_POST['country'];
     $state = $_POST['state'];
     $city = $_POST['city'];
     $zip = $_POST['zip'];
     $website = $_POST['website'];
     $email1 = $_POST['email1'];
     $email2 = $_POST['email2'];
     $pass1 = $_POST['pass1'];
     $pass2 = $_POST['pass2'];
     $humancheck = $_POST['humancheck'];

	 $storename = stripslashes($storename);
     $firstname = stripslashes($firstname);
     $lastname = stripslashes($lastname);
	 $address = stripslashes($address);
     $state = stripslashes($state);
     $city = stripslashes($city);
     $zip = stripslashes($zip);
     $website = stripslashes($website);
     $email1 = stripslashes($email1); 
     $pass1 = stripslashes($pass1); 
     $email2 = stripslashes($email2);
     $pass2 = stripslashes($pass2); 

     $storename = strip_tags($storename);
	 $firstname = strip_tags($firstname);
	 $lastname = strip_tags($lastname);
	 $address = strip_tags($address);
     $state = strip_tags($state);
     $city = strip_tags($city);
	 $zip = strip_tags($zip);
     $website = strip_tags($website);
     $email1 = strip_tags($email1);
     $pass1 = strip_tags($pass1);
     $email2 = strip_tags($email2);
     $pass2 = strip_tags($pass2);

     // Connect to database
     include_once "../Scripts/connect_to_mysql.php";
     $emailCHecker = mysqli_real_escape_string($email1);
	 $emailCHecker = eregi_replace("`", "", $emailCHecker);
     // Database duplicate e-mail check setup for use below in the error handling if else conditionals
     $sql_email_check = mysqli_query("SELECT email FROM pages WHERE email='$emailCHecker'");
     $email_check = mysqli_num_rows($sql_email_check); 

     // Error handling for missing data
     if ((!$storename) || (!$firstname) || (!$lastname) || (!$address) || (!$country) || (!$state) || (!$city) || (!$zip) || (!$email1) || (!$email2) || (!$pass1) || (!$pass2)) { 

     $errorMsg = 'ERROR: You did not submit the following required information:<br /><br />';
  
     if(!$storename){
		$errorMsg .= ' * User Name</br>';
	 }
	 if(!$firstname){ 
       $errorMsg .= ' * First Name<br />';
     } 
	 if(!$lastname){ 
       $errorMsg .= ' * Last Name<br />';
     }
	 if(!$address){ 
       $errorMsg .= ' * Address<br />';
     }
     if(!$country){ 
       $errorMsg .= ' * Country<br />';
     } 	
	 if(!$state){ 
       $errorMsg .= ' * State or Provice<br />';      
     }
	 if(!$city){ 
       $errorMsg .= ' * City<br />';        
     } 
	 if(!$zip){ 
       $errorMsg .= ' * Postal or Zip Code<br />';        
     } 		
	 if(!$email1){ 
       $errorMsg .= ' * Email Address<br />';      
     }
	 if(!$email2){ 
       $errorMsg .= ' * Confirm Email Address<br />';        
     } 	
	 if(!$pass1){ 
       $errorMsg .= ' * Login Password<br />';      
     }
	 if(!$pass2){ 
       $errorMsg .= ' * Confirm Login Password<br />';        
     } 	
	
     } else if ($email1 != $email2) {
              $errorMsg = 'ERROR: Your Email fields below do not match<br />';
     } else if ($pass1 != $pass2) {
              $errorMsg = 'ERROR: Your Password fields below do not match<br />';
     } else if ($humancheck != "") {
              $errorMsg = 'ERROR: The Human Check field must be cleared to be sure you are human<br />';		 
     } else if ($email_check > 0){ 
              $errorMsg = "<u>ERROR:</u><br />Your Email address is already in use inside our database. Please use another.<br />"; 
	   
     } else { // Error handling is ended, process the data and add member to database
     ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	
	 $storename = mysqli_real_escape_string($storename);
	 $firstname = mysqli_real_escape_string($firstname);
	 $lastname = mysqli_real_escape_string($lastname);
	 $address = mysqli_real_escape_string($address);
     $state = mysqli_real_escape_string($state);
     $city = mysqli_real_escape_string($city);
	 $zip = mysqli_real_escape_string($zip);
     $website = mysqli_real_escape_string($website);
     $email1 = mysqli_real_escape_string($email1);
     $pass1 = mysqli_real_escape_string($pass1);
	 
	 $storename - eregi_replace("`", "", $storename);
	 $firstname = eregi_replace("`", "", $firstname);
	 $lastname = eregi_replace("`", "", $lastname);
	 $address = eregi_replace("`", "", $address);
	 $state = eregi_replace("`", "", $state);
	 $city = eregi_replace("`", "", $city);
	 $zip = eregi_replace("`", "", $zip);
	 $website = eregi_replace("`", "", $website);
	 $email1 = eregi_replace("`", "", $email1);
	 $pass1 = eregi_replace("`", "", $pass1);
     $website = eregi_replace("http://", "", $website);
	 
     // Add MD5 Hash to the password variable
     $db_password = md5($pass1); 

     // Add user info into the database table for the main site table(audiopeeps.com)
     $sql = mysqli_query("INSERT INTO pages (storename, firstname, lastname, address, country, state, city, zip, email, password, sign_up_date, website) 
     VALUES('$storename','$firstname','$lastname','$address','$country','$state','$city','$zip','$email1','$db_password', now(),'$website')")  
     or die (mysqli_error());
 
     $id = mysqli_insert_id();
	 
	 // Create directory(folder) to hold each user's files(pics, MP3s, etc.)		
     mkdir("vendors/$storename", 0755);	

    //!!!!!!!!!!!!!!!!!!!!!!!!!    Email User the activation link    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    $to = "$email1";
										 
    $from = "admin@drunkinswine.com";
    $subject = "Complete The DrunkinSwine.com Registration";
    //Begin HTML Email Message
    $message = "Hi $storename,

   Complete this step to activate your login identity at Drunkin' Swine.

   Click the line below to activate when ready.

   http://www.drunkinswine.com/activation.php?id=$id&sequence=$db_password
   If the URL above is not an active link, please copy and paste it into your browser address bar

   Login after successful activation using your:  
   E-mail Address: $email1 
   Password: $pass1

   See you on the site!
   admin@drunkinswine.com";
   //end of message
	$headers  = "From: $from\r\n";
    $headers .= "Content-type: text\r\n";

    mail($to, $subject, $message, $headers);
	
   $msgToUser = "<h2>One Last Step - Activate through Email</h2><h4>OK $storename, one last step to verify your email identity:</h4><br />
   In a moment you will be sent an Activation link to your email address.<br /><br />
   <br />
   <strong><font color=\"#990000\">VERY IMPORTANT:</font></strong> 
   If you check your email with your host providers default email application, there may be issues with seeing the email contents.  If this happens to you and you cannot read the message to activate, download the file and open using a text editor. If you still cannot see the activation link, contact site admin and briefly discuss the issue.<br /><br />
   ";


   include_once 'msgToUser.php'; 

   exit();

   } // Close else after duplication checks

} else { // if the form is not posted with variables, place default empty variables
	  
	  $errorMsg = "Fields marked with an [ * ] are required";
	  $storename = "";
	  $firstname = "";
	  $lastname = "";
	  $address = "";
	  $country = "";
	  $state = "";
	  $city = "";
	  $zip = "";
	  $website = "";
	  $youtube = "";
	  $email1 = "";
	  $email2 = "";
	  $pass1 = "";
	  $pass2 = "";
}

?>
<!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" />
<title>The Depot at Gibson Mill</title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-image: url(../images/brick.png);
	background-repeat: repeat;
}
object {
   outline:none;
}
a:link {
	color: #FFA;
	text-decoration: none;
}
a:visited {
	text-decoration: none;
}
a:hover {
	text-decoration: underline;
	color: #FFF;
}
a:active {
	text-decoration: none;
}
a {
	font-family: Georgia, Times New Roman, Times, serif;
}

-->
</style>
<script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
</head>

<body>
<table width="888" align="center" cellpadding="6">
  <tr>
    <td align="center"><table width="100%" cellpadding="8">
      <tr>
        <td colspan="2"><table width="100%">
          <tr>
            <td valign="middle"><object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="900" height="215">
              <param name="movie" value="../header_TDG.swf" />
              <param name="quality" value="high" />
              <param name="wmode" value="transparent" />
              <param name="swfversion" value="6.0.65.0" />
              <param name="expressinstall" value="Scripts/expressInstall.swf" />
              <object type="application/x-shockwave-flash" data="../header_TDG.swf" width="900" height="215">
                <param name="quality" value="high" />
                <param name="wmode" value="transparent" />
                <param name="swfversion" value="6.0.65.0" />
                <param name="expressinstall" value="Scripts/expressInstall.swf" />
                <div>
                <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
                <p><a href="http://www.adobe.com/go/getflashplayer">
                <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
                  </div>
                </object>
              </object>
              </td>
            </tr>
          <tr>
            <td valign="middle" background="../images/line.png"><object id="FlashID2" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="900" height="36">
              <param name="movie" value="../buttons_insert.swf" />
              <param name="quality" value="high" />
              <param name="wmode" value="opaque" />
              <param name="swfversion" value="6.0.65.0" />
              <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you dont want users to see the prompt. -->
              <param name="expressinstall" value="Scripts/expressInstall.swf" />
              <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
              <!--[if !IE]>-->
              <object type="application/x-shockwave-flash" data="../buttons_insert.swf" width="900" height="36">
                <!--<![endif]-->
                <param name="quality" value="high" />
                <param name="wmode" value="opaque" />
                <param name="swfversion" value="6.0.65.0" />
                <param name="expressinstall" value="Scripts/expressInstall.swf" />
                <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
                <div>
                  <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
                  <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
                </div>
                <!--[if !IE]>-->
              </object>
              <!--<![endif]-->
            </object></td>
            </tr>
          <tr>
            <td valign="middle" background="../images/bkgrd.png"><!--THIS IS THE BEGINNING OF THE BROWSING FEATURE-->
            	<table width="890" align="center">     
		  			<td align="center" width="50%">
            			<form id="form1" name="form1" method="post" action="member_search.php">
			          	<p><strong>Browse Newest Vendors
            		    <input name="button" type="submit" id="button" value="Go" />
            			<input type="hidden" name="listByq" value="newest_members" />
			          	</strong></p>	
            			</form>          
        			</td>
        	        <td align="center" width="50%">
            			<form id="form3" name="form3" method="post" action="member_search.php">
			          	<p><strong>Search By Name
						<input type="text" name="fname" id="fname" />
            			<input name="button3" type="submit" id="button3" value="Go" />
			          	<input type="hidden" name="listByq" value="by_firstname" />
          				</strong></p>  
			        	</form>
        			</td>
          		</table>
            </td><!--THIS IS THE END OF TEH BROWSING SECTION -->
            </tr>
          </table>
          </td>
      </tr>
      <tr>
        <td width="20%" align="left" valign="top" background="../images/bkgrd.png" >
        	<h3 align="center"><u>Vendor List</u></h3>
			<?php echo $menuDisplay; ?></td>
        <td width="60%" align="left" background="../images/bkgrd.png" >
        	<table width="700" align="center" cellpadding="5">
        	<form action="register.php" method="post">
          	<tr>
            <td width="138" class="style7"><div align="center" class="maroon"><strong>Please Do First &rarr;</strong></div></td>
            <td width="434">Add <a href="mailto:kroberts@keifersbbq.com"><u>admin@keifersdesign.com</u></a> to your email white 				             list or safe sender list now, or else you might not get the activation email that is necessary for logging in successfully. </td>
            </tr>
            <tr>
            <td colspan="2"><font color="#FF0000"><?php print "$errorMsg"; ?></font></td>
          	</tr>
          	<tr>
            
            <td align="right"><strong><span class="maroon">Store Name:</span></strong><span class="brightRed">*</span></td>
            <td><input name="storename" type="text" class="formFields" id="storename" value="
				<?php print "$storename"; ?>" size="32" maxlength="20" /></td>
          	</tr>
          	<tr>
            
            <td align="right"><strong><span class="maroon">First Name:</span></strong><span class="brightRed">*</span></td>
            <td><input name="firstname" type="text" class="formFields" id="firstname" value="
				<?php print "$firstname"; ?>" size="32" maxlength="20" /></td>
          	</tr>
          	
            <tr>
            <td align="right" class="maroon"><strong><strong><span class="maroon">Last Name:<span class="brightRed">*</span></strong></td>
            <td><input name="lastname" type="text" class="formFields" id="lastname" value="
				<?php print "$lastname"; ?>" size="32" maxlength="20"/></td>
          	</tr>
          	
            <tr>
            <td align="right"><strong><span class="maroon">Address:</span></strong><span class="brightRed">*</span></td>
            <td><input name="address" type="text" class="formFields" id="address" value="
			<?php print "$address"; ?>" size="32" maxlength="50" /></td>
          	</tr>                    
          
          	<tr>
            <td align="right"><strong><span class="maroon">Country:</span></strong><span class="brightRed">*</span></td>
            <td>
              <select name="country" class="formFields">
                <option value="<?php print "$country"; ?>"><?php print "$country"; ?></option>
                <option value="United States of America">United States of America</option>
                <option value="Canada">Canada</option>
                <option value="Virgin Islands (Brit)">Virgin Islands Brit</option>
                <option value="Virgin Islands (USA)">Virgin Islands USA</option>
              </select>
            </td>
          	</tr>
          	
            <tr>
            <td align="right"><strong><span class="maroon">State/Province:</span></strong><span class="brightRed">*</span></td>
            <td><input name="state" type="text" class="formFields" id="state" value="
				<?php print "$state"; ?>" size="32" maxlength="36" /></td>
          	</tr>
          	
            <tr>
            <td align="right"><strong class="maroon">City:</strong><span class="brightRed">*</span></td>
            <td><input name="city" type="text" class="formFields" id="city" value="
				<?php print "$city"; ?>" size="32" maxlength="36" /></td>
          	</tr>
          	
            <tr>
            <td align="right"><strong><span class="maroon">Postal / Zip Code:</span></strong><span class="brightRed">*</span></td>
            <td><input name="zip" type="text" class="formFields" id="zip" value="
				<?php print "$zip"; ?>" size="32" maxlength="24" /></td>
          	</tr>
          	
            <tr>
            <td align="right"><strong class="maroon">Website:</strong></td>
            <td><strong>http://</strong>
            <input name="website" type="text" class="formFields" id="website" value="
				<?php print "$website"; ?>" size="40" maxlength="88" /></td>
          	</tr>          
          	
            <tr>
              <td align="right"><strong><span class="maroon">Email Address:</span></strong><span class="brightRed">*</span></td>
              <td><input name="email1" type="text" class="formFields" id="email1" value="
				<?php print "$email1"; ?>" size="32" maxlength="48" /></td>
            </tr>
          	
            <tr>
            <td align="right"><strong><span class="maroon">Confirm Email:</span></strong><span class="brightRed">*</span></td>
            <td><input name="email2" type="text" class="formFields" id="email2" value="
				<?php print "$email2"; ?>" size="32" maxlength="48" /></td>
          	</tr>
          	
            <tr>
            <td align="right"><strong><span class="maroon">Create Password:</span></strong><span class="brightRed">*</span></td>
            <td><input name="pass1" type="password" class="formFields" id="pass1" maxlength="16" />
              <span class="textSize_9px"><span class="greyColor">Alphanumeric Characters Only</span></span></td>
          	</tr>
          	
            <tr>
            <td align="right"><strong><span class="maroon">Confirm Password:</span></strong><span class="brightRed">*</span></td>
            <td><input name="pass2" type="password" class="formFields" id="pass2" maxlength="16" />
            <span class="textSize_9px"><span class="greyColor">Alphanumeric Characters Only</span></span></td>
          	</tr>
          	
            <tr>
            <td align="right"><br />
              <strong><span class="maroon">Human Check</span></strong>:<span class="brightRed">*</span></td>
            <td><br />
            <input name="humancheck" type="text" class="formFields" id="humancheck" value="Please remove all of this text" size="38" 
            maxlength="32" />
            </td>
          	</tr>
          	
            <tr>
            <td>&nbsp;</td>
            <td><p><br />
            <input type="submit" name="Submit3" value="Submit Form" />
            </p></td>
          	</tr>
        	</form>
      		</table>
        </td>
        </tr>
    </table>
    <?php echo $footer; ?></td>
  </tr>
</table>
<script type="text/javascript">
<!--
swfobject.registerObject("FlashID");
swfobject.registerObject("FlashID2");
//-->
</script>
</body>
</html>

Open in new window

Cool.  Now let's try to visualize the logic path as the code runs.  Add an echo statement after line 107 so we can be sure we got to that place in the logic.  Also, this line looks wrong:

       $storename - eregi_replace("`", "", $storename);

 Shouldn't that be an equals sign instead of a minus sign?

In a moment I will post a coding standards sample for you, but let's try those things right now.  Best, ~Ray
Here is the coding standards thing.  Always create your variables separately from where you use them.  In other words, don't do this:

     // Add user info into the database table for the main site table(audiopeeps.com)
     $sql = mysqli_query("INSERT INTO pages (storename, firstname, lastname, address, country, state, city, zip, email, password, sign_up_date, website)
     VALUES('$storename','$firstname','$lastname','$address','$country','$state','$city','$zip','$email1','$db_password', now(),'$website')")  
     or die (mysqli_error());

Instead choose to do it like the code snippet.  Why?  Glad you asked.  Because when you want to debug a query, you can just print out the values in the query string, whereas with the combination of the variables into the function call, you cannot see the query so you have to guess what is being sent to mysqli_query().  With the code snippet example you can insert an echo in between the creating of $sql and the use of it in the query.
// CONSTRUCT THE QUERY STRING
     $sql = "INSERT INTO pages ( storename,   firstname,   lastname,   address,   country,   state,   city,   zip,  email,        password, sign_up_date, website) 
                        VALUES('$storename','$firstname','$lastname','$address','$country','$state','$city','$zip','$email1','$db_password', now(),     '$website')";
                        
     // RUN THE QUERY
     $res = mysqli_query($sql);
     
     // DID THE QUERY FAIL?  IF SO SHOW THE ERROR
     if (!$res)
     {
         echo "<br/>QUERY FAILED $sql ";
         die (mysqli_error());
     }

Open in new window

ok that was my fault i changed that per animesxplsion...i had changed something and forgot to change that back in my many time testing this darn thing...but anyway...that fixes the issue of it going tot he msgToUser.php page..but nothing goes to the database nor do i receive an email to activate.
ok i inserted the code you posted and recieved this

QUERY FAILED INSERT INTO pages ( storename, firstname, lastname, address, country, state, city, zip, email, password, sign_up_date, website) VALUES('','','','','United States of America','','','','','d41d8cd98f00b204e9800998ecf8427e', now(), '')

Sorry - I usually use mysql instead of mysqli.  You need to add the link identifier.  See man page here:
http://us2.php.net/manual/en/mysqli.query.php

Now having said that, it looks like quite a bit of information is missing from the query string.  This might have something to do with the large collection of "if" statements - there could be a logic error, maybe.  Hard to follow.

I would like to suggest a way to handle the POST fields and data base inserts.  I will try to find an example in my teaching library to illustrate how to deal with those things.  You have a lot of code that can be greatly simplified, hopefully with the result that it will be easier to debug.
i tried addding this line of code for the link identifier and go tthe same result

mysqli_free_result($res);


I would love to simplify alot of this..i am new to html, php, and mysql stuff..more of a simply flash programmer..i have a client that is wanting more and i told him i could take it on..i am very confused and I appreciate your help and hanging with me

you too animesxplosion
     $sql = "INSERT INTO pages ( storename,   firstname,   lastname,   address,   country,   state,   city,   zip,  email,        password, sign_up_date, website) 
                        VALUES('$storename','$firstname','$lastname','$address','$country','$state','$city','$zip','$email1','$db_password', now(),     '$website')";
                        
     // RUN THE QUERY
     $res = mysqli_query($sql);
     
     // DID THE QUERY FAIL?  IF SO SHOW THE ERROR
     if (!$res)
     {
         echo "<br/>QUERY FAILED $sql ";
         die (mysqli_error());
     }
	//------------------------------------------------- 
	mysqli_free_result($res); 

Open in new window

mysqli_free_result($res); is almost never needed - the PHP garbage collection routines will handle that detail.  Before you go too far down the PHP road, get this book.  It is simply excellent.  
http://www.sitepoint.com/books/phpmysql4/

When the query failed, what did you get for mysqli_error()?
this is what i got when the query failed

QUERY FAILED INSERT INTO pages ( storename, firstname, lastname, address, country, state, city, zip, email, password, sign_up_date, website) VALUES('','','','','United States of America','','','','','d41d8cd98f00b204e9800998ecf8427e', now(), '')
What is the name of your mysqli connection link?  According to the man page (see example 2) it should be part of the mysqli_query() function call.
http://us2.php.net/manual/en/mysqli.query.php
"this is what i got when the query failed"

The next line should have printed out the mysqli_error() data.  Did you get anything there?

It may need that connection link.  Please see example 2 here:
http://us2.php.net/manual/en/mysqli.error.php
I added the code below and got this error

Errormessage: Unknown system variable 'a'
QUERY FAILED INSERT INTO pages ( storename, firstname, lastname, address, country, state, city, zip, email, password, sign_up_date, website) VALUES('','','','','United States of America','','','','','d41d8cd98f00b204e9800998ecf8427e', now(), '')
$link = mysqli_connect("localhost", "root", "*******", "theDepot");

/* check connection */
if (mysqli_connect_errno()) {
    printf("Connect failed: %s\n", mysqli_connect_error());
    exit();
}

if (!mysqli_query($link, "SET a=1")) {
    printf("Errormessage: %s\n", mysqli_error($link));
}

Open in new window

Got to go to church - I will check back in a little while.  Suggest you read up on the query syntax for mysqli procedural calls - just read the online man page examples, and try to model your calls on those examples.  We can look at the new code then.  Best regards, ~Ray
This is UNTESTED CODE, but hopefully it will show you a way of sanitizing the $_POST data.  We do it in a loop here.  Our program knows exactly what data to expect (shown in the $pf array) and we use the switch / case structure to direct the program to the appropriate validation and escape logic.

Some would argue that we should use a different var instead of $_POST and I would agree with that, but in PHP the superglobal vars are not immutable, and you can change them in your program code.
<?php // RAY_post_to_db_example.php
error_reporting(E_ALL);
echo "<pre>\n";

// THE FIELDS WE EXPECT TO RECEIVE IN $_POST
$pf = array( 'name', 'addr', 'email' );

// IF ANYTHING WAS POSTED, PROCESS IT
if (!empty($_POST))
{
    // PROCESS EACH ELEMENT OF THE POSTED INFORMATION
    foreach ($_POST as $key => $val)
    {
        // IS THIS A FIELD THAT WE EXPECT
        if (!in_array($key, $pf)
        {
            /* ILLEGAL POST DATA - SCRIPT IS UNDER ATTACK? */
            die("$key NOT AUTHORIZED");
        }
        
        // CHECK THE FIELD FOR USABILITY
        switch ($key) // MIRRORS $pf ELEMENTS
        {
            // OPTIONAL EDITS AND ESCAPES FOR THESE FIELDS
            case 'name':
            case 'addr':
            $_POST[$key] = mysql_real_escape_string($val);
            break;
            
            case 'email':
            if (!check_valid_email($val)) $_POST["email"] = ''; // DISCARD BOGUS EMAIL
            $_POST["email"] = mysql_real_escape_string($_POST["email"]);
            break;
        }
    }
}
// NOW EVERYTHING IN $_POST IS CLEAN, ESCAPED AND READY FOR THE DATA BASE
$sql = "INSERT INTO myTable ( name, addr, email ) VALUES ( '{$_POST["name"]}', '{$_POST["addr"]}', '{$_POST["email"]}' )";

// SHOW THE QUERY
var_dump($sql);




// A FUNCTION TO TEST FOR A VALID EMAIL ADDRESS, RETURN TRUE OR FALSE
function check_valid_email($email)
{

// IF PHP 5.2 OR ABOVE, WE CAN USE THE FILTER
// MAN PAGE: http://us3.php.net/manual/en/intro.filter.php
    if (strnatcmp(phpversion(),'5.2') >= 0)
    {
        if(filter_var($email, FILTER_VALIDATE_EMAIL) === FALSE) return FALSE;
    }
    else
    {
        $regex = '/^[A-Z0-9_-][A-Z0-9._-]*@([A-Z0-9][A-Z0-9-]*\.)+[A-Z\.]{2,6}$/i';
        if (!preg_match($regex, $email)) return FALSE;
    }

    // FILTER or PREG DOES NOT TEST IF THE DOMAIN OF THE EMAIL ADDRESS IS ROUTABLE
    $domain = explode('@', $email);
    if ( checkdnsrr($domain[1],"MX") || checkdnsrr($domain[1],"A") ) return TRUE;

    // EMAIL NOT ROUTABLE
    return FALSE;
}

Open in new window

so i should use this code instead of the current php code and it will do essentially the same thing??
ok i have input the code that you provided and changed the some of the names to reflect the feilds in the database table..the register.php page will not show up...it shows a blank white screen.
<?php
session_start();

require_once "Scripts/connect_to_mysql.php";

error_reporting(E_ALL);
echo "<pre>\n";

// THE FIELDS WE EXPECT TO RECEIVE IN $_POST
$pf = array( 'storename', 'address', 'email' );

// IF ANYTHING WAS POSTED, PROCESS IT
if (!empty($_POST))
{
    // PROCESS EACH ELEMENT OF THE POSTED INFORMATION
    foreach ($_POST as $key => $val)
    {
        // IS THIS A FIELD THAT WE EXPECT
        if (!in_array($key, $pf)
        {
            /* ILLEGAL POST DATA - SCRIPT IS UNDER ATTACK? */
            die("$key NOT AUTHORIZED");
        }
        
        // CHECK THE FIELD FOR USABILITY
        switch ($key) // MIRRORS $pf ELEMENTS
        {
            // OPTIONAL EDITS AND ESCAPES FOR THESE FIELDS
            case 'storename':
            case 'address':
            $_POST[$key] = mysql_real_escape_string($val);
            break;
            
            case 'email':
            if (!check_valid_email($val)) $_POST["email"] = ''; // DISCARD BOGUS EMAIL
            $_POST["email"] = mysql_real_escape_string($_POST["email"]);
            break;
        }
    }
}
// NOW EVERYTHING IN $_POST IS CLEAN, ESCAPED AND READY FOR THE DATA BASE
$sql = "INSERT INTO pages ( storename, address, email ) VALUES ( '{$_POST["storename"]}', '{$_POST["address"]}', '{$_POST["email"]}' )";

// SHOW THE QUERY
var_dump($sql);

// A FUNCTION TO TEST FOR A VALID EMAIL ADDRESS, RETURN TRUE OR FALSE
function check_valid_email($email)
{

// IF PHP 5.2 OR ABOVE, WE CAN USE THE FILTER
// MAN PAGE: http://us3.php.net/manual/en/intro.filter.php
    if (strnatcmp(phpversion(),'5.2') >= 0)
    {
        if(filter_var($email, FILTER_VALIDATE_EMAIL) === FALSE) return FALSE;
    }
    else
    {
        $regex = '/^[A-Z0-9_-][A-Z0-9._-]*@([A-Z0-9][A-Z0-9-]*\.)+[A-Z\.]{2,6}$/i';
        if (!preg_match($regex, $email)) return FALSE;
    }

    // FILTER or PREG DOES NOT TEST IF THE DOMAIN OF THE EMAIL ADDRESS IS ROUTABLE
    $domain = explode('@', $email);
    if ( checkdnsrr($domain[1],"MX") || checkdnsrr($domain[1],"A") ) return TRUE;

    // EMAIL NOT ROUTABLE
    return FALSE;
}               
     mkdir("vendors/$storename", 0755);

//*****==========================================================================*****
    $to = "$email1";
                                                                                 
    $from = "admin@keifersdesign.com";
    $subject = "Complete The Depot at Gibson Mill.com Registration";
    //Begin HTML Email Message
    $message = "Hi $storename,

   Complete this step to activate your login identity at The Depot at Gibson Mill.

   Click the line below to activate when ready.

   http://www.keifersdesign.com/activation.php?id=$id&sequence=$db_password
   If the URL above is not an active link, please copy and paste it into your browser address bar

   Login after successful activation using your:  
   E-mail Address: $email1
   Password: $pass1

   See you on the site!
   admin@keifersdesign.com";
   //end of message
        $headers  = "From: $from\r\n";
    $headers .= "Content-type: text\r\n";

    mail($to, $subject, $message, $headers);
       
   $msgToUser = "<h2>One Last Step - Activate through Email</h2><h4>OK $storename, one last step to verify your email identity:</h4><br />
   In a moment you will be sent an Activation link to your email address.<br /><br />
   <br />
   <strong><font color=\"#990000\">VERY IMPORTANT:</font></strong>
   If you check your email with your host providers default email application, there may be issues with seeing the email contents.  If this happens to you and you cannot read the message to activate, download the file and open using a text editor. If you still cannot see the activation link, contact site admin and briefly discuss the issue.<br /><br />
   ";


   include_once 'msgToUser.php';

   exit();

} // Close else after duplication checks

} else { // if the form is not posted with variables, place default empty variables
         
          $errorMsg = "Fields marked with an [ * ] are required";
          $storename = "";
          $firstname = "";
          $lastname = "";
          $address = "";
          $country = "";
          $state = "";
          $city = "";
          $zip = "";
          $website = "";
          $email1 = "";
          $email2 = "";
          $pass1 = "";
          $pass2 = "";
}
?>

Open in new window

At this point I am going to recommend that you hire a professional PHP developer.  This is not a question any more, it is a debugging exercise that is complicated by the fact that you are new to PHP and do not understand many of the basic concepts.  There is nothing wrong with that - we all have to start somewhere.  My most frequent recommendation of a good starter book is this one from SitePoint:
http://www.sitepoint.com/books/phpmysql4/

It has great examples and takes a step-wise approach to learning PHP, working up from simple examples to a completed solution set.  Along the way you will find access to an online code library that you can copy to make the work easier.  Give yourself a couple of months to work through that book, then get "PHP 5 in Practice" by Eli White.  Once you have finished reading the two of those you will be much better off in PHP.  Sorry I do not have an equivalent recommendation for MySQL, but the SitePoint book teaches a lot of the basics on that front.  

Be patient with yourself as you learn.  You would not be expected to become a concert pianist in only a year of practice; you won't be a PHP virtuoso in a year either.  But you will see progress and hopefully you will have fun along the way.

Best of luck with it, ~Ray
I understand that I am new to this..hince the reason I am asking for help..I got this code from a tutorial i watch and it worked on another site i did..but for some reason it is not working on this one. I will have to say that its probably a database issue and not so much the php code...I will check with my hosting company and see if there are some issues...

I just find it wierd how i can pull the information from the database in other page of the site but cannot input information via php script to that database..just seems it some sort of communication error.

oh well thanks for your help and I will find the answer some how
Here is my teaching example of how to MySQL queries.  The differences with MySQLi are fairly small - just syntactical mostly.  Maybe there is a germ of inspiration in there.  And if you got that script from a tutorial, don't bookmark the tutorial; the SitePoint book will be a lot better.

Also, you might want to look into "coding standards" - practices that make your code easier to read.  That and good comments are worth a lot when you want to make your intention clear.

Best, ~Ray
<?php // RAY_mysql_example.php
error_reporting(E_ALL);

// IMPORTANT PAGES FROM THE MANUALS
// MAN PAGE: http://us2.php.net/manual/en/ref.mysql.php
// MAN PAGE: http://us2.php.net/manual/en/mysql.installation.php
// MAN PAGE: http://us.php.net/manual/en/function.mysql-error.php



// CONNECTION AND SELECTION VARIABLES FOR THE DATABASE
$db_host = "localhost"; // PROBABLY THIS IS OK
$db_name = "??";        // GET THESE FROM YOUR HOSTING COMPANY
$db_user = "??";
$db_word = "??";

// OPEN A CONNECTION TO THE DATA BASE SERVER
// MAN PAGE: http://us2.php.net/manual/en/function.mysql-connect.php
if (!$db_connection = mysql_connect("$db_host", "$db_user", "$db_word"))
{
   $errmsg = mysql_errno() . ' ' . mysql_error();
   echo "<br/>NO DB CONNECTION: ";
   echo "<br/> $errmsg <br/>";
}

// SELECT THE MYSQL DATA BASE
// MAN PAGE: http://us2.php.net/manual/en/function.mysql-select-db.php
if (!$db_sel = mysql_select_db($db_name, $db_connection))
{
   $errmsg = mysql_errno() . ' ' . mysql_error();
   echo "<br/>NO DB SELECTION: ";
   echo "<br/> $errmsg <br/>";
   die('NO DATA BASE');
}
// IF WE GOT THIS FAR WE CAN DO QUERIES




// ESCAPING A DATA FIELD FOR USE IN MYSQL QUERIES
// MAN PAGE: http://us2.php.net/manual/en/function.mysql-real-escape-string.php
$safe_username = mysql_real_escape_string($_POST["username"]);




// CREATING AND SENDING A SELECT QUERY AND TESTING THE RESULTS
// MAN PAGE:http://us2.php.net/manual/en/function.mysql-query.php
$sql = "SELECT id FROM my_table WHERE username='$safe_username'";
$res = mysql_query($sql);

// IF mysql_query() RETURNS FALSE, GET THE ERROR REASONS
// MAN PAGE: http://us.php.net/manual/en/function.mysql-error.php
if (!$res)
{
   $errmsg = mysql_errno() . ' ' . mysql_error();
   echo "<br/>QUERY FAIL: ";
   echo "<br/>$sql <br/>";
   die($errmsg);
}
// IF WE GET THIS FAR, THE QUERY SUCCEEDED AND WE HAVE A RESOURCE-ID IN $res SO WE CAN NOW USE $res IN OTHER MYSQL FUNCTIONS




// DETERMINE HOW MANY ROWS OF RESULTS WE GOT
// MAN PAGE: http://us2.php.net/manual/en/function.mysql-num-rows.php
$num = mysql_num_rows($res);
if (!$num)
{
   echo "<br/>QUERY FOUND NO DATA: ";
   echo "<br/>$sql <br/>";
}
else
{
   echo "<br/>QUERY FOUND $num ROWS OF DATA ";
   echo "<br/>$sql <br/>";
}




// ITERATE OVER THE RESULTS SET TO SHOW WHAT WE FOUND
// MAN PAGE: http://us2.php.net/manual/en/function.mysql-fetch-assoc.php
echo "<pre>\n"; // MAKE IT EASY TO READ
while ($row = mysql_fetch_assoc($res))
{
   var_dump($row); // MAN PAGE: http://us2.php.net/manual/en/function.var-dump.php
}




// A WAY OF DETERMINING HOW MANY ROWS WE HAVE IN A TABLE
// MAN PAGE: http://us.php.net/mysql_fetch_array
$sql = "SELECT COUNT(*) FROM my_table";
$res = mysql_query($sql);

// IF mysql_query() RETURNS FALSE, GET THE ERROR REASONS
if (!$res)
{
   $errmsg = mysql_errno() . ' ' . mysql_error();
   echo "<br/>QUERY FAIL: ";
   echo "<br/>$sql <br/>";
   die($errmsg);
}
// GET THE RESULTS SET ROW IN AN ARRAY WITH A NUMERIC INDEX - POSITION ZERO IS THE COUNT
$row = mysql_fetch_array($res, MYSQL_NUM);
$num = $row[0];




// MAKING AN INSERT QUERY AND TESTING THE RESULTS
$sql = "INSERT INTO my_table (username) VALUES (\"$safe_username\")";
$res = mysql_query($sql);

// IF mysql_query() RETURNS FALSE, GET THE ERROR REASONS
if (!$res)
{
   $errmsg = mysql_errno() . ' ' . mysql_error();
   echo "<br/>QUERY FAIL: ";
   echo "<br/>$sql <br/>";
   die($errmsg);
}
// GET THE AUTO_INCREMENT ID OF THE RECORD JUST INSERTED - PER THE DB CONNECTION
// MAN PAGE: http://us2.php.net/manual/en/function.mysql-insert-id.php
$id  = mysql_insert_id($db_connection);

Open in new window

Avatar of hielo
.
your connection string has:
>>$myConnection = mysqli_connect("$db_host","$db_username","$db_pass", "$db_name") or die ("could not connect to mysql");  

Upon successful connection to the db server, the variable $myConnection is a valid resource that "points" to your db server. Since you are using mysqli (not mysql), you need to keep those manual pages close to you so that you can lookup the functions you are using. 

There are two ways to use mysqli:
a. object-oriented style
$db=new mysqli(...);

b. procedural style:
$myConnection = mysqli_connect("localhost", "my_user", "my_password", "world");

You chose to use style "b", so you need to adhere to procedural style in the documentation.

Most of the mysqli procedural functions require the valid resource that points to your db(in your case $myConnection) as an argument to the function you are using. For example, you have:

$sql_email_check = mysqli_query("SELECT `email` FROM `pages` WHERE `email`='{$emailCHecker}'");

if you look up the PROCEDURAL style reference to mysqli_query():
http://us.php.net/manual/en/mysqli.query.php

you will notice that it requires a "link" identifier. Again, in your case this is the variable $myConnection. So it should be:

$sql_email_check = mysqli_query($myConnection, "SELECT `email` FROM `pages` WHERE `email`='{$emailCHecker}'");


By contrast, if you look up mysqli_num_rows():
http://us.php.net/manual/en/mysqli-result.num-rows.php
     $email_check = mysqli_num_rows($sql_email_check);

you can clearly see that it does NOT require that link identifier ($myConnection). Hence,keep the manual pages opened and refer to them as needed. 

Other function that DO need that link identifier include:
mysqli_error($myConnection);
mysqli_real_escape_string($myConnection,...);

The blank page is most likely because your query is failing and you are not getting error details because you are not specifying the link identifier to the db.

Open in new window

@hielo: Right - the link identifier ( ID: 26127303 and others ).

;-)

~Ray
ok guys..once again..thank you so much with the help...hielo...Heilo I have taken your advice..I went back to the original code and made some changes. i had posted in earlier in my the posts about shouldn't i be referencing the $myConnection in my script...Ray called it a link identifier and I, being a novice, did not understand what he was talkiing about.


with all that said...adding the $myConnection to the following code has helped, not fixed,  the situation...i am getting some results in the database.. such as:password, date, and country..nothing else is showing up....

i assume that there is something else prohibiting that the rest of it come in...

i also noticed it put the information in the database twice
>>the link identifier ( ID: 26127303 and others ).
I did notice that, and if you look at his follow-up post ( ID: 26127363 ), he is still not using the link identifier. That tells me he didn't understand your post at all, hence my follow up :)
rename YOUR register.php to register_bk.php. AFTER you have renamed your register.php, try saving the attached code as register.php. It should be very close to what you are after.
<?php
//this array is a "lookup table" for the required fields.
$required=array(	"storename"=>' * User Name'
				,"firstname"=>' * First Name'
				,"lastname"=>' * Last Name'
				,"address"=>' * Address'
				,"country"=>' * Country'
				,"state"=>' * State or Provice';      
				,"city"=>' * City';        
				,"zip"=>' * Postal or Zip Code';        
				,"email1"=>' * Email Address';      
				,"email2"=>' * Confirm Email Address';        
				,"pass1"=>' * Login Password';      
				,"pass2"=>' * Confirm Login Password';        
		);

//this array will keep track of the errors found
$errs=array();

if( isset($_POST['firstname']) )
{
     // Connect to database
     include_once "../Scripts/connect_to_mysql.php";
 
	foreach($_POST as $fieldName=>$fieldValue)
	{
		//see if the field is required
		if(isset($required[$fieldName]) && empty($fieldValue) )
		{
			$errs[]="<strong>{$required[$fieldName]}</strong> is a required field.";
		}
		else
		{
			//this line creates the fields dynamically. So if you submitted
			//$_POST[zip], it creates a variable $zip and the value is "sanitized"
			//based on what you had earlier
			${$fieldName}=str_replace("`","",strip_tags(stripslashes($fieldValue)));
		}
	}
	if(empty($errs))
	{
		if ($email1 != $email2)
		{
              $errs[]='Your <strong>Email</strong> fields below do not match';
     	}
		if ($pass1 != $pass2)
		{
			$errs[]='Your <strong>Password</strong> fields below do not match';
		}
		if ($humancheck != "")
		{
              $errs[]='The <strong>Human Check</strong> field must be cleared to be sure you are human';		 
		}
	}

	//if there are no errors so far check for pre-existing email
	if(empty($errs)
	{
		foreach($_POST as $fieldName=>$fieldValue)
		{
			${$fieldName}=mysqli_real_escape_string($myConnection, ${$fieldName} );
		}

		// Database duplicate e-mail check setup for use below in the error handling if else conditionals
		$sql_email_check = mysqli_query($myConnection, "SELECT `email` FROM `pages` WHERE `email`='{$email1}'");

		$email_check = mysqli_num_rows($sql_email_check) or die( mysqli_error($myConnection));

		if ($email_check > 0)
		{ 
              $errs[]="Your <strong>Email address</strong> is already in use.  Please use another one.";
     	}		
	}

	if(!empty($errs)){
		echo "<p>The information you submitted contains errors, specifically:</p>";
		echo "<ul style='list-style-position:inside'><li>".implode('</li><li>',$errs)."</li></ul>";
	}
	else
	{
		$website = str_replace("http://", "", $website);
	 
		// Add MD5 Hash to the password variable
		$db_password = md5($pass1); 

		// Add user info into the database table for the main site table(audiopeeps.com)
		$sql = mysqli_query($myConnection, "INSERT INTO `pages` (`storename`, `firstname`, `lastname`, `address`, `country`, `state`, `city`, `zip`, `email`, `password`, `sign_up_date`, `website`) 
		VALUES('$storename','$firstname','$lastname','$address','$country','$state','$city','$zip','$email1','$db_password', now(),'$website')")  
		or die (mysqli_error($myConnection));
 
		$id = mysqli_insert_id();

		// Create directory(folder) to hold each user's files(pics, MP3s, etc.)		
		mkdir("vendors/$storename", 0755);	

		//!!!!!!!!!!!!!!!!!!!!!!!!!    Email User the activation link    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
		$to = $email1;
		$from = "admin@keifersdesign.com";
		$subject = "Complete The Depot at Gibson Mill.com Registration";
		//Begin HTML Email Message
		$message =<<<MSG1
			Hi {$storename},
			Complete this step to activate your login identity at The Depot at Gibson Mill.

			Click the line below to activate when ready.

				http://www.keifersdesign.com/activation.php?id={$id}&sequence={$db_password}

			If the URL above is not an active link, please copy and paste it into your browser address bar

			Login after successful activation using your:  
			E-mail Address: {$email1} 
			Password: {$pass1}

			See you on the site!
			admin@keifersdesign.com";
MSG1;
//end of message

		$headers  = "From: $from\r\n";
		$headers .= "Content-type: text\r\n";

		mail($to, $subject, $message, $headers);
	
		$msgToUser =<<<MSG2
		<h2>One Last Step - Activate through Email</h2>
		<h4>OK $storename, one last step to verify your email identity:</h4>
   		<p>In a moment you will be sent an Activation link to your email address.</p>

   		<p><strong style="color:#990000">VERY IMPORTANT:</strong> 
   		If you check your email with your host providers default email application, there may be issues with seeing the email contents.  If this happens to you and you cannot read the message to activate, download the file and open using a text editor. If you still cannot see the activation link, contact site admin and briefly discuss the issue.</p>
MSG2;

		include_once 'msgToUser.php'; 
		exit();
	}
?>

Open in new window

thanks hielo...i have replace the the register.php with your code and I get a blank white screen when going to the url http://keifersdesign.com/administrator/register.php



Try adding error_reporting(E_ALL); to the top of the script.  
ini_set('display_errors', TRUE);
error_reporting(E_ALL);

Open in new window

Looks like you might want to replace the "$required" array with something like this.
$required = array( 
    "storename" => ' * User Name',
    "firstname" => ' * First Name',
    "lastname"  => ' * Last Name',
    "address"   => ' * Address',
    "country"   => ' * Country',
    "state"     => ' * State or Province',
    "city"      => ' * City',
    "zip"       => ' * Postal or Zip Code',
    "email1"    => ' * Email Address',
    "email2"    => ' * Confirm Email Address',
    "pass1"     => ' * Login Password',
    "pass2"     => ' * Confirm Login Password',
  );

Open in new window

After you do that look near line 59 or 60 and find this:

      if(empty($errs)

Change it to this:

      if(empty($errs))
Then go to the last line and find this:

?>

Replace it with this:

}
Once you've done those things, go back to the top of the script and throw in a data visualizer for $_POST.  Your script will now look something like this.  Try submitting your form to that page and then post the output back here.  Or save your time and hire that developer!

Best, ~Ray
<?php
ini_set('display_errors', TRUE);
error_reporting(E_ALL);
var_dump($_POST);

//this array is a "lookup table" for the required fields.
$required = array(
    "storename" => ' * User Name',
    "firstname" => ' * First Name',
    "lastname"  => ' * Last Name',
    "address"   => ' * Address',
    "country"   => ' * Country',
    "state"     => ' * State or Province',
    "city"      => ' * City',
    "zip"       => ' * Postal or Zip Code',
    "email1"    => ' * Email Address',
    "email2"    => ' * Confirm Email Address',
    "pass1"     => ' * Login Password',
    "pass2"     => ' * Confirm Login Password',
  );

//this array will keep track of the errors found
$errs=array();

if( isset($_POST['firstname']) )
{
     // Connect to database
     include_once "../Scripts/connect_to_mysql.php";

	foreach($_POST as $fieldName=>$fieldValue)
	{
		//see if the field is required
		if(isset($required[$fieldName]) && empty($fieldValue) )
		{
			$errs[]="<strong>{$required[$fieldName]}</strong> is a required field.";
		}
		else
		{
			//this line creates the fields dynamically. So if you submitted
			//$_POST[zip], it creates a variable $zip and the value is "sanitized"
			//based on what you had earlier
			${$fieldName}=str_replace("`","",strip_tags(stripslashes($fieldValue)));
		}
	}
	if(empty($errs))
	{
		if ($email1 != $email2)
		{
              $errs[]='Your <strong>Email</strong> fields below do not match';
     	}
		if ($pass1 != $pass2)
		{
			$errs[]='Your <strong>Password</strong> fields below do not match';
		}
		if ($humancheck != "")
		{
              $errs[]='The <strong>Human Check</strong> field must be cleared to be sure you are human';
		}
	}

	//if there are no errors so far check for pre-existing email
	if(empty($errs))
	{
		foreach($_POST as $fieldName=>$fieldValue)
		{
			${$fieldName}=mysqli_real_escape_string($myConnection, ${$fieldName} );
		}

		// Database duplicate e-mail check setup for use below in the error handling if else conditionals
		$sql_email_check = mysqli_query($myConnection, "SELECT `email` FROM `pages` WHERE `email`='{$email1}'");

		$email_check = mysqli_num_rows($sql_email_check) or die( mysqli_error($myConnection));

		if ($email_check > 0)
		{
              $errs[]="Your <strong>Email address</strong> is already in use.  Please use another one.";
     	}
	}

	if(!empty($errs))
	{
		echo "<p>The information you submitted contains errors, specifically:</p>";
		echo "<ul style='list-style-position:inside'><li>".implode('</li><li>',$errs)."</li></ul>";
	}
	else
	{
		$website = str_replace("http://", "", $website);

		// Add MD5 Hash to the password variable
		$db_password = md5($pass1);

		// Add user info into the database table for the main site table(audiopeeps.com)
		$sql = mysqli_query($myConnection, "INSERT INTO `pages` (`storename`, `firstname`, `lastname`, `address`, `country`, `state`, `city`, `zip`, `email`, `password`, `sign_up_date`, `website`)
		VALUES('$storename','$firstname','$lastname','$address','$country','$state','$city','$zip','$email1','$db_password', now(),'$website')")
		or die (mysqli_error($myConnection));

		$id = mysqli_insert_id();

		// Create directory(folder) to hold each user's files(pics, MP3s, etc.)
		mkdir("vendors/$storename", 0755);

		//!!!!!!!!!!!!!!!!!!!!!!!!!    Email User the activation link    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
		$to = $email1;
		$from = "admin@keifersdesign.com";
		$subject = "Complete The Depot at Gibson Mill.com Registration";
		//Begin HTML Email Message
		$message =<<<MSG1
			Hi {$storename},
			Complete this step to activate your login identity at The Depot at Gibson Mill.

			Click the line below to activate when ready.

				http://www.keifersdesign.com/activation.php?id={$id}&sequence={$db_password}

			If the URL above is not an active link, please copy and paste it into your browser address bar

			Login after successful activation using your:
			E-mail Address: {$email1}
			Password: {$pass1}

			See you on the site!
			admin@keifersdesign.com";
MSG1;
//end of message

		$headers  = "From: $from\r\n";
		$headers .= "Content-type: text\r\n";

		mail($to, $subject, $message, $headers);

		$msgToUser =<<<MSG2
		<h2>One Last Step - Activate through Email</h2>
		<h4>OK $storename, one last step to verify your email identity:</h4>
   		<p>In a moment you will be sent an Activation link to your email address.</p>

   		<p><strong style="color:#990000">VERY IMPORTANT:</strong>
   		If you check your email with your host providers default email application, there may be issues with seeing the email contents.  If this happens to you and you cannot read the message to activate, download the file and open using a text editor. If you still cannot see the activation link, contact site admin and briefly discuss the issue.</p>
MSG2;

		include_once 'msgToUser.php';
		exit();
	}
}

Open in new window

well added all your revisions to hielo code...but to no avail once again...shouldn't there be a end tag of "?>" at the end of the php script...

also, not worried about my time..I am one of those that can look at the code and somewhat figure out how it works...with the help of people like you..reading a book has not been my forte for quite sometime..so that would be not help...

i again appreciate YOUR time...
"end tag of "?>" at the end of the php script..."  No, modern coding standards recommend against it.

Please tell us where is the form script located?  Also, can you please post the output you got after you submitted the form to the new "register.php" script?
"reading a book has not been my forte for quite sometime" - Wow, if you think education is expensive, just try ignorance!  I don't get paid to recommend that book, but I do know when I see somebody floundering, who really needs to get enough of a the foundation that we can have a conversation.  You need to know at least enough that you can make a few basic tests to determine why you are getting a blank screen, right?
the form script is located in the same file..register.php --- i have posted the whole code twice in this post.. the whole code in the register.php file is below

i am not getting any error messages with the new code...just a blank screen

as far as the ignorance goes...no reason to call names..i am just telling you..I am not a good reader..if that makes me ignorant that is fine..I am just trying to get a certain piece of code to work..thats it..if you would like to continue to help me that would be great and much appreciated. If not i can repost the problem and see if another expert may be to help troubleshoot my situation...
<?php
ini_set('display_errors', TRUE);
error_reporting(E_ALL);
var_dump($_POST);

//this array is a "lookup table" for the required fields.
$required = array(
    "storename" => ' * User Name',
    "firstname" => ' * First Name',
    "lastname"  => ' * Last Name',
    "address"   => ' * Address',
    "country"   => ' * Country',
    "state"     => ' * State or Province',
    "city"      => ' * City',
    "zip"       => ' * Postal or Zip Code',
    "email1"    => ' * Email Address',
    "email2"    => ' * Confirm Email Address',
    "pass1"     => ' * Login Password',
    "pass2"     => ' * Confirm Login Password',
  );

//this array will keep track of the errors found
$errs=array();

if( isset($_POST['firstname']) )
{
     // Connect to database
     include_once "../Scripts/connect_to_mysql.php";

	foreach($_POST as $fieldName=>$fieldValue)
	{
		//see if the field is required
		if(isset($required[$fieldName]) && empty($fieldValue) )
		{
			$errs[]="<strong>{$required[$fieldName]}</strong> is a required field.";
		}
		else
		{
			//this line creates the fields dynamically. So if you submitted
			//$_POST[zip], it creates a variable $zip and the value is "sanitized"
			//based on what you had earlier
			${$fieldName}=str_replace("`","",strip_tags(stripslashes($fieldValue)));
		}
	}
	if(empty($errs))
	{
		if ($email1 != $email2)
		{
              $errs[]='Your <strong>Email</strong> fields below do not match';
     	}
		if ($pass1 != $pass2)
		{
			$errs[]='Your <strong>Password</strong> fields below do not match';
		}
		if ($humancheck != "")
		{
              $errs[]='The <strong>Human Check</strong> field must be cleared to be sure you are human';
		}
	}

	//if there are no errors so far check for pre-existing email
	if(empty($errs))
	{
		foreach($_POST as $fieldName=>$fieldValue)
		{
			${$fieldName}=mysqli_real_escape_string($myConnection, ${$fieldName} );
		}

		// Database duplicate e-mail check setup for use below in the error handling if else conditionals
		$sql_email_check = mysqli_query($myConnection, "SELECT `email` FROM `pages` WHERE `email`='{$email1}'");

		$email_check = mysqli_num_rows($sql_email_check) or die( mysqli_error($myConnection));

		if ($email_check > 0)
		{
              $errs[]="Your <strong>Email address</strong> is already in use.  Please use another one.";
     	}
	}

	if(!empty($errs))
	{
		echo "<p>The information you submitted contains errors, specifically:</p>";
		echo "<ul style='list-style-position:inside'><li>".implode('</li><li>',$errs)."</li></ul>";
	}
	else
	{
		$website = str_replace("http://", "", $website);

		// Add MD5 Hash to the password variable
		$db_password = md5($pass1);

		// Add user info into the database table for the main site table(audiopeeps.com)
		$sql = mysqli_query($myConnection, "INSERT INTO `pages` (`storename`, `firstname`, `lastname`, `address`, `country`, `state`, `city`, `zip`, `email`, `password`, `sign_up_date`, `website`)
		VALUES('$storename','$firstname','$lastname','$address','$country','$state','$city','$zip','$email1','$db_password', now(),'$website')")
		or die (mysqli_error($myConnection));

		$id = mysqli_insert_id();

		// Create directory(folder) to hold each user's files(pics, MP3s, etc.)
		mkdir("vendors/$storename", 0755);

		//!!!!!!!!!!!!!!!!!!!!!!!!!    Email User the activation link    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
		$to = $email1;
		$from = "admin@keifersdesign.com";
		$subject = "Complete The Depot at Gibson Mill.com Registration";
		//Begin HTML Email Message
		$message =<<<MSG1
			Hi {$storename},
			Complete this step to activate your login identity at The Depot at Gibson Mill.

			Click the line below to activate when ready.

				http://www.keifersdesign.com/activation.php?id={$id}&sequence={$db_password}

			If the URL above is not an active link, please copy and paste it into your browser address bar

			Login after successful activation using your:
			E-mail Address: {$email1}
			Password: {$pass1}


			See you on the site!
			admin@keifersdesign.com";
MSG1;
//end of message

		$headers  = "From: $from\r\n";
		$headers .= "Content-type: text\r\n";

		mail($to, $subject, $message, $headers);

		$msgToUser =<<<MSG2
		<h2>One Last Step - Activate through Email</h2>
		<h4>OK $storename, one last step to verify your email identity:</h4>
   		<p>In a moment you will be sent an Activation link to your email address.</p>

   		<p><strong style="color:#990000">VERY IMPORTANT:</strong>
   		If you check your email with your host providers default email application, there may be issues with seeing the email contents.  If this happens to you and you cannot read the message to activate, download the file and open using a text editor. If you still cannot see the activation link, contact site admin and briefly discuss the issue.</p>
MSG2;

		include_once 'msgToUser.php';
		exit();
	}
}

<!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" />
<title>The Depot at Gibson Mill</title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-image: url(../images/brick.png);
	background-repeat: repeat;
}
object {
   outline:none;
}
a:link {
	color: #FFA;
	text-decoration: none;
}
a:visited {
	text-decoration: none;
}
a:hover {
	text-decoration: underline;
	color: #FFF;
}
a:active {
	text-decoration: none;
}
a {
	font-family: Georgia, Times New Roman, Times, serif;
}

-->
</style>
<script src="Scripts/swfobject_modified.js" type="text/javascript"></script>
</head>

<body>
<table width="888" align="center" cellpadding="6">
  <tr>
    <td align="center"><table width="100%" cellpadding="8">
      <tr>
        <td colspan="2"><table width="100%">
          <tr>
            <td valign="middle"><object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="900" height="215">
              <param name="movie" value="../header_TDG.swf" />
              <param name="quality" value="high" />
              <param name="wmode" value="transparent" />
              <param name="swfversion" value="6.0.65.0" />
              <param name="expressinstall" value="Scripts/expressInstall.swf" />
              <object type="application/x-shockwave-flash" data="../header_TDG.swf" width="900" height="215">
                <param name="quality" value="high" />
                <param name="wmode" value="transparent" />
                <param name="swfversion" value="6.0.65.0" />
                <param name="expressinstall" value="Scripts/expressInstall.swf" />
                <div>
                <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
                <p><a href="http://www.adobe.com/go/getflashplayer">
                <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
                  </div>
                </object>
              </object>
              </td>
            </tr>
          <tr>
            <td valign="middle" background="../images/line.png"><object id="FlashID2" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="900" height="36">
              <param name="movie" value="../buttons_insert.swf" />
              <param name="quality" value="high" />
              <param name="wmode" value="opaque" />
              <param name="swfversion" value="6.0.65.0" />
              <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you dont want users to see the prompt. -->
              <param name="expressinstall" value="Scripts/expressInstall.swf" />
              <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
              <!--[if !IE]>-->
              <object type="application/x-shockwave-flash" data="../buttons_insert.swf" width="900" height="36">
                <!--<![endif]-->
                <param name="quality" value="high" />
                <param name="wmode" value="opaque" />
                <param name="swfversion" value="6.0.65.0" />
                <param name="expressinstall" value="Scripts/expressInstall.swf" />
                <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
                <div>
                  <h4>Content on this page requires a newer version of Adobe Flash Player.</h4>
                  <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" width="112" height="33" /></a></p>
                </div>
                <!--[if !IE]>-->
              </object>
              <!--<![endif]-->
            </object></td>
            </tr>
          <tr>
            <td valign="middle" background="../images/bkgrd.png"><!--THIS IS THE BEGINNING OF THE BROWSING FEATURE-->
            	<table width="890" align="center">     
		  			<td align="center" width="50%">
            			<form id="form1" name="form1" method="post" action="member_search.php">
			          	<p><strong>Browse Newest Vendors
            		    <input name="button" type="submit" id="button" value="Go" />
            			<input type="hidden" name="listByq" value="newest_members" />
			          	</strong></p>	
            			</form>          
        			</td>
        	        <td align="center" width="50%">
            			<form id="form3" name="form3" method="post" action="member_search.php">
			          	<p><strong>Search By Name
						<input type="text" name="fname" id="fname" />
            			<input name="button3" type="submit" id="button3" value="Go" />
			          	<input type="hidden" name="listByq" value="by_firstname" />
          				</strong></p>  
			        	</form>
        			</td>
          		</table>
            </td><!--THIS IS THE END OF TEH BROWSING SECTION -->
            </tr>
          </table>
          </td>
      </tr>
      <tr>
        <td width="20%" align="left" valign="top" background="../images/bkgrd.png" >
        	<h3 align="center"><u>Vendor List</u></h3>
			<?php echo $menuDisplay; ?></td>
        <td width="60%" align="left" background="../images/bkgrd.png" >
        	<table width="700" align="center" cellpadding="5">
        	<form action="register.php" method="post">
          	<tr>
            <td width="138" class="style7"><div align="center" class="maroon"><strong>Please Do First &rarr;</strong></div></td>
            <td width="434">Add <a href="mailto:kroberts@keifersbbq.com"><u>admin@keifersdesign.com</u></a> to your email white 				             list or safe sender list now, or else you might not get the activation email that is necessary for logging in successfully. </td>
            </tr>
            <tr>
            <td colspan="2"><font color="#FF0000"><?php print "$errorMsg"; ?></font></td>
          	</tr>
          	<tr>
            
            <td align="right"><strong><span class="maroon">Store Name:</span></strong><span class="brightRed">*</span></td>
            <td><input name="storename" type="text" class="formFields" id="storename" value="
				<?php print "$storename"; ?>" size="32" maxlength="20" /></td>
          	</tr>
          	<tr>
            
            <td align="right"><strong><span class="maroon">First Name:</span></strong><span class="brightRed">*</span></td>
            <td><input name="firstname" type="text" class="formFields" id="firstname" value="
				<?php print "$firstname"; ?>" size="32" maxlength="20" /></td>
          	</tr>
          	
            <tr>
            <td align="right" class="maroon"><strong><strong><span class="maroon">Last Name:<span class="brightRed">*</span></strong></td>
            <td><input name="lastname" type="text" class="formFields" id="lastname" value="
				<?php print "$lastname"; ?>" size="32" maxlength="20"/></td>
          	</tr>
          	
            <tr>
            <td align="right"><strong><span class="maroon">Address:</span></strong><span class="brightRed">*</span></td>
            <td><input name="address" type="text" class="formFields" id="address" value="
			<?php print "$address"; ?>" size="32" maxlength="50" /></td>
          	</tr>                    
          
          	<tr>
            <td align="right"><strong><span class="maroon">Country:</span></strong><span class="brightRed">*</span></td>
            <td>
              <select name="country" class="formFields">
                <option value="<?php print "$country"; ?>"><?php print "$country"; ?></option>
                <option value="United States of America">United States of America</option>
                <option value="Canada">Canada</option>
                <option value="Virgin Islands (Brit)">Virgin Islands Brit</option>
                <option value="Virgin Islands (USA)">Virgin Islands USA</option>
              </select>
            </td>
          	</tr>
          	
            <tr>
            <td align="right"><strong><span class="maroon">State/Province:</span></strong><span class="brightRed">*</span></td>
            <td><input name="state" type="text" class="formFields" id="state" value="
				<?php print "$state"; ?>" size="32" maxlength="36" /></td>
          	</tr>
          	
            <tr>
            <td align="right"><strong class="maroon">City:</strong><span class="brightRed">*</span></td>
            <td><input name="city" type="text" class="formFields" id="city" value="
				<?php print "$city"; ?>" size="32" maxlength="36" /></td>
          	</tr>
          	
            <tr>
            <td align="right"><strong><span class="maroon">Postal / Zip Code:</span></strong><span class="brightRed">*</span></td>
            <td><input name="zip" type="text" class="formFields" id="zip" value="
				<?php print "$zip"; ?>" size="32" maxlength="24" /></td>
          	</tr>
          	
            <tr>
            <td align="right"><strong class="maroon">Website:</strong></td>
            <td><strong>http://</strong>
            <input name="website" type="text" class="formFields" id="website" value="
				<?php print "$website"; ?>" size="40" maxlength="88" /></td>
          	</tr>          
          	
            <tr>
              <td align="right"><strong><span class="maroon">Email Address:</span></strong><span class="brightRed">*</span></td>
              <td><input name="email1" type="text" class="formFields" id="email1" value="
				<?php print "$email1"; ?>" size="32" maxlength="48" /></td>
            </tr>
          	
            <tr>
            <td align="right"><strong><span class="maroon">Confirm Email:</span></strong><span class="brightRed">*</span></td>
            <td><input name="email2" type="text" class="formFields" id="email2" value="
				<?php print "$email2"; ?>" size="32" maxlength="48" /></td>
          	</tr>
          	
            <tr>
            <td align="right"><strong><span class="maroon">Create Password:</span></strong><span class="brightRed">*</span></td>
            <td><input name="pass1" type="password" class="formFields" id="pass1" maxlength="16" />
              <span class="textSize_9px"><span class="greyColor">Alphanumeric Characters Only</span></span></td>
          	</tr>
          	
            <tr>
            <td align="right"><strong><span class="maroon">Confirm Password:</span></strong><span class="brightRed">*</span></td>
            <td><input name="pass2" type="password" class="formFields" id="pass2" maxlength="16" />
            <span class="textSize_9px"><span class="greyColor">Alphanumeric Characters Only</span></span></td>
          	</tr>
          	
            <tr>
            <td align="right"><br />
              <strong><span class="maroon">Human Check</span></strong>:<span class="brightRed">*</span></td>
            <td><br />
            <input name="humancheck" type="text" class="formFields" id="humancheck" value="Please remove all of this text" size="38" 
            maxlength="32" />
            </td>
          	</tr>
          	
            <tr>
            <td>&nbsp;</td>
            <td><p><br />
            <input type="submit" name="Submit3" value="Submit Form" />
            </p></td>
          	</tr>
        	</form>
      		</table>
        </td>
        </tr>
    </table>
    <?php echo $footer; ?></td>
  </tr>
</table>
<script type="text/javascript">
<!--
swfobject.registerObject("FlashID");
swfobject.registerObject("FlashID2");
//-->
</script>
</body>
</html>

Open in new window

You need to correct this:

Parse error: syntax error, unexpected '<' in /home/websitet/public_html/RAY_foo.php on line 146

That will be corrected by putting BACK the ?> end-of-PHP tag that I removed from the earlier example.  The reason I removed it was because THE POSTED CODE DID NOT REQUIRE IT.  Now the new posted code does require it.

But a bigger question looms here.  WHY are you getting a blank screen instead of the error messages that I see when I run your script?  I think you need to ask your hosting provider to help you get past that problem first, then you will have some chance of debugging the code.

And as to ignorance - it is not a sin, just a fact.  I am ignorant of plenty of things, and when it looks like that ignorance is standing in the way of my success I try to do something about it.

Anyway, EE is about asking questions and getting answers.  It looks like you're not asking questions because you cannot see the error messages.  So get that fixed and then we can proceed to the next question.  Time to close this one out and move along.  Good luck, ~Ray
thanks...i will check into reading you posted..
Initialize all your variables. You are probably not initializing some of your variables.
NOTE:
$id = mysqli_insert_id();

should be:
$id = mysqli_insert_id($myConnection);

attached is an updated version of my original code which includes  some other changes. Do a copy and paste from it.

//this array is a "lookup table" for the required fields.
$fields=array(		"storename"=>	array(required=>true, label=>' * User Name')
				,"firstname"=>	array(required=>true, label=>' * First Name')
				,"lastname"=>	array(required=>true, label=>' * Last Name')
				,"address"=>	array(required=>true, label=>' * Address')
				,"country"=>	array(required=>true, label=>' * Country')
				,"state"=>	array(required=>true, label=>' * State or Provice')     
				,"city"=>		array(required=>true, label=>' * City')
				,"zip"=>		array(required=>true, label=>' * Postal or Zip Code')
				,"email1"=>	array(required=>true, label=>' * Email Address')
				,"email2"=>	array(required=>true, label=>' * Confirm Email Address')
				,"pass1"=>	array(required=>true, label=>' * Login Password')
				,"pass2"=>	array(required=>true, label=>' * Confirm Login Password')
				,"humancheck"=>array(required=>false,label=>' Human Check')
		);

//this array will keep track of the errors found
$errs=array();

//dynamically create the variables an initialize to empty string
foreach($fields as $k=>$v){
	${$k}="";
}
$errorMsg="";
if(!isset($menuDisplay) )
{
	$menuDisplay="";
}

if(!isset($footer))
{
	$footer="";
}

if( isset($_POST) && !empty($_POST) )
{
     // Connect to database
     include_once "../Scripts/connect_to_mysql.php";
 
	foreach($_POST as $fieldName=>$fieldValue)
	{
		//see if the field is required
		if(isset($fields[$fieldName]) && TRUE===$fields[$fieldName]['required'] && empty($fieldValue) )
		{
			$errs[]="<strong>{$required[$fieldName]}</strong> is a required field.";
		}
		else
		{
			//this line creates the fields dynamically. So if you submitted
			//$_POST[zip], it creates a variable $zip and the value is "sanitized"
			//based on what you had earlier
			${$fieldName}=str_replace("`","",strip_tags(stripslashes($fieldValue)));
		}
	}
	if(empty($errs))
	{
		if ($email1 != $email2)
		{
              $errs[]='Your <strong>Email</strong> fields below do not match';
     	}
		if ($pass1 != $pass2)
		{
			$errs[]='Your <strong>Password</strong> fields below do not match';
		}
		if ($humancheck != "")
		{
              $errs[]='The <strong>Human Check</strong> field must be cleared to be sure you are human';		 
		}
	}

	//if there are no errors so far check for pre-existing email
	if(empty($errs))
	{
		foreach($_POST as $fieldName=>$fieldValue)
		{
			${$fieldName}=mysqli_real_escape_string($myConnection, ${$fieldName} );
		}

		// Database duplicate e-mail check setup for use below in the error handling if else conditionals
		$sql_email_check = mysqli_query($myConnection, "SELECT `email` FROM `pages` WHERE `email`='{$email1}'");

		$email_check = mysqli_num_rows($sql_email_check) or die( mysqli_error($myConnection));

		if ($email_check > 0)
		{ 
              $errs[]="Your <strong>Email address</strong> is already in use.  Please use another one.";
     	}		
	}

	if(!empty($errs))
	{
		$errorMsg.="<p>The information you submitted contains errors, specifically:</p>";
		$errorMsg.="<ul style='list-style-position:inside'><li>".implode('</li><li>',$errs)."</li></ul>";
	}
	else
	{
		$website = str_replace("http://", "", $website);
	 
		// Add MD5 Hash to the password variable
		$db_password = md5($pass1); 

		// Add user info into the database table for the main site table(audiopeeps.com)
		$sql = mysqli_query($myConnection, "INSERT INTO `pages` (`storename`, `firstname`, `lastname`, `address`, `country`, `state`, `city`, `zip`, `email`, `password`, `sign_up_date`, `website`) 
		VALUES('$storename','$firstname','$lastname','$address','$country','$state','$city','$zip','$email1','$db_password', now(),'$website')")  
		or die (mysqli_error($myConnection));
 
		$id = mysqli_insert_id($myConnection);

		// Create directory(folder) to hold each user's files(pics, MP3s, etc.)		
		if( !mkdir("vendors/$storename", 0755) )
		{
			echo "Unable to create directory 'vendors/{$storename}'";
		}	

		//!!!!!!!!!!!!!!!!!!!!!!!!!    Email User the activation link    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
		$to = $email1;
		$from = "admin@keifersdesign.com";
		$subject = "Complete The Depot at Gibson Mill.com Registration";
		//Begin HTML Email Message
		$message =<<<MSG1
			Hi {$storename},
			Complete this step to activate your login identity at The Depot at Gibson Mill.

			Click the line below to activate when ready.

				http://www.keifersdesign.com/activation.php?id={$id}&sequence={$db_password}

			If the URL above is not an active link, please copy and paste it into your browser address bar

			Login after successful activation using your:  
			E-mail Address: {$email1} 
			Password: {$pass1}

			See you on the site!
			admin@keifersdesign.com";
MSG1;
//end of message

		$headers  = "From: $from\r\n";
		$headers .= "Content-type: text\r\n";

		mail($to, $subject, $message, $headers);
	
		$msgToUser =<<<MSG2
		<h2>One Last Step - Activate through Email</h2>
		<h4>OK $storename, one last step to verify your email identity:</h4>
   		<p>In a moment you will be sent an Activation link to your email address.</p>

   		<p><strong style="color:#990000">VERY IMPORTANT:</strong> 
   		If you check your email with your host providers default email application, there may be issues with seeing the email contents.  If this happens to you and you cannot read the message to activate, download the file and open using a text editor. If you still cannot see the activation link, contact site admin and briefly discuss the issue.</p>
MSG2;

		include_once 'msgToUser.php'; 
		exit();
	}
}
?>

Open in new window

just a quick question

if you have lets say fields in your database
storename, storeDescription, firstname, last name

and you are only trying to insert
storename, firstname, lastname

even though we did not have storeDescription in the INSERT part..would that make a difference?
>>even though we did not have storeDescription in the INSERT part..would that make a difference?
That depends on the field definition. If the field is allowed to be NULL, then no you don't have to make it part of your statement. Otherwise you will need to provide a value. If you don't have a value, you can use a zero-length string (empty string), and it should accept it just fine.
// Add user info into the database table for the main site table(audiopeeps.com)
		$sql = mysqli_query($myConnection, "INSERT INTO `pages` (`storename`, `storeDescription`, `firstname`, `lastname`, `address`, `country`, `state`, `city`, `zip`, `email`, `password`, `sign_up_date`, `website`) 
		VALUES('$storename', '', '$firstname','$lastname','$address','$country','$state','$city','$zip','$email1','$db_password', now(),'$website')")  
		or die (mysqli_error($myConnection));

Open in new window

ok thanks  hielo...i have copy and pasted your code...i was able to see the register form and fill it out...but it did not take me to the msgToUser.php after submitting?

>>it did not take me to ...
maybe the path is wrong. Try using:

require_once 'msgToUser.php';

instead of:
include_once 'msgToUser.php';

if the path is your problem, you will clearly see the error message triggered by the server.
changed it to require_once  and same scenerio...was able to input information into the fields and then click submit...no errors showed and nothing came into the database nor did it to do msgToUser.php...it just goes to a white screen

here is the link..does it do it for you?
http://keifersdesign.com/administrator/register.php
change:
$errs[]="<strong>{$required[$fieldName]}</strong> is a required field.";

to:
$errs[]="<strong>{$fields[$fieldName]['label']}</strong> is a required field.";

so the user knows which fields are missing. Currently, when you submit and empty form, it doesn't tell you which fields are missing.
made the changes and still no change..no errors show and nothing in the database...

if you want to give up...i wont blame you...since the code has change to what we have started i am not so much help looking at what to change on my end...
try this:
<?php
//this array is a "lookup table" for the required fields.
$fields=array(		"storename"=>	array(required=>true, label=>' * User Name')
				,"firstname"=>	array(required=>true, label=>' * First Name')
				,"lastname"=>	array(required=>true, label=>' * Last Name')
				,"address"=>	array(required=>true, label=>' * Address')
				,"country"=>	array(required=>true, label=>' * Country')
				,"state"=>	array(required=>true, label=>' * State or Provice')     
				,"city"=>		array(required=>true, label=>' * City')
				,"zip"=>		array(required=>true, label=>' * Postal or Zip Code')
				,"email1"=>	array(required=>true, label=>' * Email Address')
				,"email2"=>	array(required=>true, label=>' * Confirm Email Address')
				,"pass1"=>	array(required=>true, label=>' * Login Password')
				,"pass2"=>	array(required=>true, label=>' * Confirm Login Password')
				,"humancheck"=>array(required=>false,label=>' Human Check')
		);

//this array will keep track of the errors found
$errs=array();

//dynamically create the variables an initialize to empty string
foreach($fields as $k=>$v){
	${$k}="";
}
$errorMsg="";
if(!isset($menuDisplay) )
{
	$menuDisplay="";
}

if(!isset($footer))
{
	$footer="";
}

if( isset($_POST) && !empty($_POST) )
{
     // Connect to database
     include_once "../Scripts/connect_to_mysql.php";
 
	foreach($_POST as $fieldName=>$fieldValue)
	{
		//see if the field is required
		if(isset($fields[$fieldName]) && TRUE===$fields[$fieldName]['required'] && empty($fieldValue) )
		{
			$errs[]="<strong>{$required[$fieldName]}</strong> is a required field.";
		}
		else
		{
			//this line creates the fields dynamically. So if you submitted
			//$_POST[zip], it creates a variable $zip and the value is "sanitized"
			//based on what you had earlier
			${$fieldName}=str_replace("`","",strip_tags(stripslashes($fieldValue)));
		}
	}
	if(empty($errs))
	{
		if ($email1 != $email2)
		{
              $errs[]='Your <strong>Email</strong> fields below do not match';
     	}
		if ($pass1 != $pass2)
		{
			$errs[]='Your <strong>Password</strong> fields below do not match';
		}
		if ($humancheck != "")
		{
              $errs[]='The <strong>Human Check</strong> field must be cleared to be sure you are human';		 
		}
	}

	//if there are no errors so far check for pre-existing email
	if(empty($errs))
	{
		foreach($_POST as $fieldName=>$fieldValue)
		{
			${$fieldName}=mysqli_real_escape_string($myConnection, ${$fieldName} );
		}

		// Database duplicate e-mail check setup for use below in the error handling if else conditionals
		$sql_email_check = mysqli_query($myConnection, "SELECT `email` FROM `pages` WHERE `email`='{$email1}'");

		$email_check = mysqli_num_rows($sql_email_check) or die( mysqli_error($myConnection));
		mysqli_free_result($sql_email_check);
		if ($email_check > 0)
		{ 
              $errs[]="Your <strong>Email address</strong> is already in use.  Please use another one.";
     	}		
	}

	if(!empty($errs))
	{
		$errorMsg.="<p>The information you submitted contains errors, specifically:</p>";
		$errorMsg.="<ul style='list-style-position:inside'><li>".implode('</li><li>',$errs)."</li></ul>";
	}
	else
	{
		$website = str_replace("http://", "", $website);
	 
		// Add MD5 Hash to the password variable
		$db_password = md5($pass1); 

		$query="INSERT INTO `pages` (`storename`, `storeDescription`, `firstname`, `lastname`, `address`, `country`, `state`, `city`, `zip`, `email`, `password`, `sign_up_date`, `website`) 
						VALUES('$storename', '', '$firstname','$lastname','$address','$country','$state','$city','$zip','$email1','$db_password', now(),'$website')";

		// Add user info into the database table for the main site table(audiopeeps.com)
		$sql = mysqli_query($myConnection, $query);

		if(!$sql)
		{
			die ("Query Failed!<br/>\n" . $query . "<br/>\n" . mysqli_error($myConnection));
		} 

		$id = mysqli_insert_id($myConnection);

		// Create directory(folder) to hold each user's files(pics, MP3s, etc.)		
		if( !mkdir("vendors/$storename", 0755) )
		{
			echo "Unable to create directory 'vendors/{$storename}'";
		}	

		//!!!!!!!!!!!!!!!!!!!!!!!!!    Email User the activation link    !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
		$to = $email1;
		$from = "admin@keifersdesign.com";
		$subject = "Complete The Depot at Gibson Mill.com Registration";
		//Begin HTML Email Message
		$message =<<<MSG1
			Hi {$storename},
			Complete this step to activate your login identity at The Depot at Gibson Mill.

			Click the line below to activate when ready.

				http://www.keifersdesign.com/activation.php?id={$id}&sequence={$db_password}

			If the URL above is not an active link, please copy and paste it into your browser address bar

			Login after successful activation using your:  
			E-mail Address: {$email1} 
			Password: {$pass1}

			See you on the site!
			admin@keifersdesign.com";
MSG1;
//end of message

		$headers  = "From: $from\r\n";
		$headers .= "Content-type: text\r\n";

		mail($to, $subject, $message, $headers);
	
		$msgToUser =<<<MSG2
		<h2>One Last Step - Activate through Email</h2>
		<h4>OK $storename, one last step to verify your email identity:</h4>
   		<p>In a moment you will be sent an Activation link to your email address.</p>

   		<p><strong style="color:#990000">VERY IMPORTANT:</strong> 
   		If you check your email with your host providers default email application, there may be issues with seeing the email contents.  If this happens to you and you cannot read the message to activate, download the file and open using a text editor. If you still cannot see the activation link, contact site admin and briefly discuss the issue.</p>
MSG2;

		include_once 'msgToUser.php'; 
		exit();
	}
}
?>

Open in new window

same thing..i am beginning to think that my server does not like me...
ASKER CERTIFIED SOLUTION
Avatar of hielo
hielo
Flag of Wallis and Futuna image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
after pasted the code in the and uploading to the server and going to the register.php url this was at the top of the page...

http://keifersdesign.com/administrator/register.php
Notice: Use of undefined constant required - assumed 'required' in /var/www/html/administrator/register.php on line 7

Notice: Use of undefined constant label - assumed 'label' in /var/www/html/administrator/register.php on line 7

Notice: Use of undefined constant required - assumed 'required' in /var/www/html/administrator/register.php on line 8

Notice: Use of undefined constant label - assumed 'label' in /var/www/html/administrator/register.php on line 8

Notice: Use of undefined constant required - assumed 'required' in /var/www/html/administrator/register.php on line 9

Notice: Use of undefined constant label - assumed 'label' in /var/www/html/administrator/register.php on line 9

Notice: Use of undefined constant required - assumed 'required' in /var/www/html/administrator/register.php on line 10

Notice: Use of undefined constant label - assumed 'label' in /var/www/html/administrator/register.php on line 10

Notice: Use of undefined constant required - assumed 'required' in /var/www/html/administrator/register.php on line 11

Notice: Use of undefined constant label - assumed 'label' in /var/www/html/administrator/register.php on line 11

Notice: Use of undefined constant required - assumed 'required' in /var/www/html/administrator/register.php on line 12

Notice: Use of undefined constant label - assumed 'label' in /var/www/html/administrator/register.php on line 12

Notice: Use of undefined constant required - assumed 'required' in /var/www/html/administrator/register.php on line 13

Notice: Use of undefined constant label - assumed 'label' in /var/www/html/administrator/register.php on line 13

Notice: Use of undefined constant required - assumed 'required' in /var/www/html/administrator/register.php on line 14

Notice: Use of undefined constant label - assumed 'label' in /var/www/html/administrator/register.php on line 14

Notice: Use of undefined constant required - assumed 'required' in /var/www/html/administrator/register.php on line 15

Notice: Use of undefined constant label - assumed 'label' in /var/www/html/administrator/register.php on line 15

Notice: Use of undefined constant required - assumed 'required' in /var/www/html/administrator/register.php on line 16

Notice: Use of undefined constant label - assumed 'label' in /var/www/html/administrator/register.php on line 16

Notice: Use of undefined constant required - assumed 'required' in /var/www/html/administrator/register.php on line 17

Notice: Use of undefined constant label - assumed 'label' in /var/www/html/administrator/register.php on line 17

Notice: Use of undefined constant required - assumed 'required' in /var/www/html/administrator/register.php on line 18

Notice: Use of undefined constant label - assumed 'label' in /var/www/html/administrator/register.php on line 18

Notice: Use of undefined constant required - assumed 'required' in /var/www/html/administrator/register.php on line 19

Notice: Use of undefined constant label - assumed 'label' in /var/www/html/administrator/register.php on line 19

tracer: 39

Open in new window

quote the required and label keys:
$fields=array(		"storename"=>	array("required"=>true, "label"=>' * User Name')
				,"firstname"=>	array("required"=>true, "label"=>' * First Name')
				,"lastname"=>	array("required"=>true, "label"=>' * Last Name')
				,"address"=>	array("required"=>true, "label"=>' * Address')
				,"country"=>	array("required"=>true, "label"=>' * Country')
				,"state"=>	array("required"=>true, "label"=>' * State or Provice')     
				,"city"=>		array("required"=>true, "label"=>' * City')
				,"zip"=>		array("required"=>true, "label"=>' * Postal or Zip Code')
				,"email1"=>	array("required"=>true, "label"=>' * Email Address')
				,"email2"=>	array("required"=>true, "label"=>' * Confirm Email Address')
				,"pass1"=>	array("required"=>true, "label"=>' * Login Password')
				,"pass2"=>	array("required"=>true, "label"=>' * Confirm Login Password')
				,"humancheck"=>array("required"=>false,"label"=>' Human Check')
		);

Open in new window

also, notice that the query where you are checking for existence of email address WAS:
$sql_email_check = mysqli_query($myConnection, "SELECT `email` FROM `pages` WHERE `email`='{$email1}'") ;


but not it is:
$sql_email_check = mysqli_query($myConnection, "SELECT `email` FROM `pages` WHERE `email`='{$email1}'") or die(mysqli_error($myConnection));
>>but not it is:
I meant to write:

but NOW it is:
which one should it be...?
changing both codes...used the

$sql_email_check = mysqli_query($myConnection, "SELECT `email` FROM `pages` WHERE `email`='{$email1}'") ;

i got this trace after filling out the form and hitting submit

tracer: 40
tracer: 44
tracer: 49
tracer: 53
tracer: 53
tracer: 53
tracer: 53
tracer: 53
tracer: 53
tracer: 53
tracer: 53
tracer: 53
tracer: 53
tracer: 53
tracer: 53
tracer: 53
tracer: 53
tracer: 53
tracer: 70
tracer: 89
tracer: 96
tracer: 100

Open in new window

change:
$email_check = mysqli_num_rows($sql_email_check) or die( mysqli_error($myConnection));

to:
$email_check = mysqli_num_rows($sql_email_check);
after changing
$email_check = mysqli_num_rows($sql_email_check);

i get this

tracer: 40
tracer: 44
tracer: 49
tracer: 53
tracer: 53
tracer: 53
tracer: 53
tracer: 53
tracer: 53
tracer: 53
tracer: 53
tracer: 53
tracer: 53
tracer: 53
tracer: 53
tracer: 53
tracer: 53
tracer: 53
tracer: 70
tracer: 89
tracer: 96
tracer: 99
tracer: 101
tracer: 103
tracer: 109
tracer: 119
tracer: 125
tracer: 129
tracer: 133
tracer: 140
tracer: 144 

Open in new window

Isn't it working now? Is the data in the DB? Do you get an email? It seems to have worked!
holy crap it worked....
thank you sooooo so much...for sticking with me...you have been so much help...i will definitely study your code and learn from it...
One last edit around line 57 - change:
$errs[]="<strong>{$required[$fieldName]}</strong> is a required field.";

to:
$errs[]="<strong>{$fields[$fieldName]['label']}</strong> is a required field.";
done...thanks again...should i remove the trace statements?
>>should i remove the trace statements?
Of course.

Take care.
Hielo
thanks hielo