any ideas would be greatly appreciated.
register.php
<?php
session_start();
require('FuncFile.php');
if(isset($_POST['fmlyVerify'])&& $_POST['fmlyVerify']==true){
//make sure form is filled out completely & correctly
//if not, set $Message, if so call Register()
//if fmlyVerify is not set, call showRegForm() again
$userName=$_POST['uName'];
$Fname=$_POST['fName'];
$Lname=$_POST['lName'];
if(!empty($_POST['uName']) && !empty($_POST['fName']) && !empty($_POST['lName']) && !empty($_POST['eMail1']) && !empty($_POST['eMail2'])&& !empty($_POST['Pass1']) && !empty($_POST['Pass2'])){
$eMail1=$_POST['eMail1'];
$eMail2=$_POST['eMail2'];
if($eMail1!=$eMail2){
$ErrMsg='Error. Email Addresses Must Match.';
}//end if
else{
$Pass1=$_POST['Pass1'];
$Pass2=$_POST['Pass2'];
if($Pass1!=$Pass2){
$ErrMsg='Error. Passwords must match.';
}//end nested if
else{
$ErrMsg=Register($userName,$Fname,$Lname,$eMail1,$Pass1);
}//end else
}// end else
}//end 2nd if
else{
$ErrMsg="You Must Fill Out All Fields.";
}
}//end main if clause
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>LawzTech: Register</title>
<meta name="keywords" content="lawztech,don't leave it to chance, leave it to me,laws,laws family, michigan,MI,mi laws, laws mi,Donnie Laws, Don laws resume,laws resume, resumes,blog,contact lawztech" />
<meta name="description" content="Don't leave it to chance, leave it to me,Lawztech on the web, Resumes for Don Laws, Laws Family blog" />
<link href="styles.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<div id="content">
<div id="back">
<!-- header begins -->
<div id="header">
<div id="logo">
<h1><a href="#">lawztech</a></h1>
<p>Don't Leave it to Chance, Leave it to Me </p>
<h2> </h2>
</div>
<div id="menu">
<ul>
<li><a href="index.php" title="">Home</a></li>
<li><a href="blog.php" title="">Blog</a></li>
<li><a href="gallery.php" title="">Gallery</a></li>
<li><a href="resumes.php" title="">resumes</a></li>
<li><a href="about.php" title="">About</a></li>
<li><a href="contact.php" title="">Contact</a></li>
<li><a href="forum/index.php" title="">Forum</a></li>
</ul>
</div>
</div>
<!-- header ends -->
<!-- content begins -->
<div id="main">
<div id="right">
<h2 align="center">Registration for Lawztech Family Area</h2>
<form id="frmRegister" method="post" action="<?php $_SERVER['PHP_SELF']; ?>">
<table width="100%" height="311" border="0">
<tr>
<td width="26%" height="34"><div align="right">UserName:</div></td>
<td colspan="2"><input type="text" name="uName" id="uName" /></td>
<td width="33%"> </td>
</tr>
<tr>
<td width="26%" height="34"><div align="right">First Name:</div></td>
<td colspan="2"><input type="text" name="fName" id="fName" /></td>
<td width="33%"> </td>
</tr>
<tr>
<td height="41"><div align="right">Last Name:</div></td>
<td colspan="2"><input type="text" name="lName" id="lName" /></td>
<td> </td>
</tr>
<tr>
<td height="40"><div align="right">Email Address:</div></td>
<td colspan="2"><input type="text" name="eMail1" id="eMail1" /></td>
<td rowspan="2"><div align="center">Family?</div> <p align="center">
<label>
<input type="radio" name="fmlyVerify" value="true" id="fmlyVerify_0" />
Yes</label>
<label>
<input type="radio" name="fmlyVerify" value="false" id="fmlyVerify_1" />
No</label>
<br />
</p></td>
</tr>
<tr>
<td height="41"><div align="right">Verify Email:</div></td>
<td colspan="2"><input type="text" name="eMail2" id="eMail2" /></td>
</tr>
<tr>
<td height="42"><div align="right">Password:</div></td>
<td colspan="2"><input type="text" name="Pass1" id="Pass1" /></td>
<td> </td>
</tr>
<tr>
<td height="44"><div align="right">Verify Password:</div></td>
<td colspan="2"><input type="text" name="Pass2" id="Pass2" /></td>
<td> </td>
</tr>
<tr>
<td height="40"> </td>
<td width="21%"><div align="center">
<input type="submit" name="submit" id="submit" value="Submit" />
</div></td>
<td width="20%"><div align="center">
<input type="reset" name="reset" id="reset" value="Reset" />
</div></td>
<td>
<?php
if(isset($ErrMsg)){
echo $ErrMsg;
}
?>
</td>
</tr>
</table>
</form>
<p align="center"> </p>
<p align="center">You will be notified via email when your membership has been</p>
<p align="center">approved. You will be able to login to the members-only</p>
<p align="center">section at that time</p>
<p align="center"> </p>
</div>
<div id="left">
<h3>Members</h3>
<p>Once verified and activated, you will be able to log in to the family section of the site. This is totally seperate from your forum membership.
<br />
</p>
<h3>Lawztech's favorites </h3>
<ul>
<li><ul>
<li><a href="www.dreamincode.net">Dream In Code</a></li>
<li><a href="www.rentacoder.com">Rent A Coder</a></li>
<li><a href="www.scriptlance.com">ScriptLance</a></li>
<li><a href="www.linkedin.com">LinkedIn</a></li>
<li><a href="wwww.elance.com">E-Lance</a></li>
</ul>
<!-- AddThis Button BEGIN -->
<a href="http://www.addthis.com/bookmark.php?v=250&pub=xa-4a79cc4e2b9b1800" onmouseover="return addthis_open(this, '', '[URL]', '[TITLE]')" onmouseout="addthis_close()" onclick="return addthis_sendto()"><img src="http://s7.addthis.com/static/btn/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a><script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js?pub=xa-4a79cc4e2b9b1800"></script>
<!-- AddThis Button END -->
</li>
</ul>
<br />
<h3> rac freelance ticker </h3>
<ul>
<li id="calendar">
<div id="calendar1">
<IFRAME ID=IFrame1 FRAMEBORDER=0 SCROLLING=NO width=150 Height=300 SRC= "http://www.RentACoder.com/RentACoder/misc/LinkToUs/ScrollingBidRequests.asp?txtWidth=150&txtHeight=300&blnHideChannelSubscribe=true&blnLaunchLinkInNewWindow=true&blnFullTitle=true&txtBgColor=white" height=300>
Your browser does not support inline frames...However, you can click
<A href="http://www.RentACoder.com/RentACoder/misc/LinkToUs/ScrollingBidRequests.asp?blnHideChannelSubscribe=true&blnLaunchLinkInNewWindow=true&blnFullTitle=true">here</a> to see the related document.
</IFRAME>
</div>
</li>
</ul>
</div>
<!--content ends -->
<!--footer begins -->
</div>
<div id="footer">
<a href="http://jigsaw.w3.org/css-validator/check/referer"><img
src="images/vcss-blue.gif"
alt="Valid CSS!" align="left" style="border:0;width:88px;height:31px" /></a>
<p>Copyright © 2008.</p>
<p><a href="#">Privacy Policy</a> | <a href="#">Terms of Use</a> | <a href="http://validator.w3.org/check/referer" title="This page validates as XHTML 1.0 Transitional"><abbr title="eXtensible HyperText Markup Language">XHTML</abbr></a> | <a href="http://jigsaw.w3.org/css-validator/check/referer" title="This page validates as CSS"><abbr title="Cascading Style Sheets">CSS</abbr></a> </p>
</div>
</div>
</div>
<!-- footer ends-->
</body>
</html>
function file
<?php
// PHP include File
// Programmer: Don Laws
// Date: 08/11/09
// Contains Functions for all pages.
function Register($uName,$fName,$lName,$Email,$Password){
//Connect to MySQL server
$Conn=@mysqli_connect('localhost','124054','karllie') or die ('<p>Unable to connect to server.</p><p>Error Code: '. mysqli_connect_errno().': '.mysqli_connect_error().'</p>');
echo('Successfully connected to the database.');
// Set database
@mysqli_select_db($Conn,'124054')or die('<p>Unable to Connect Database.</p><p>Error Code: '.mysqli_errno($Conn).': '.mysqli_error($Conn).'</p>');
echo('<p>Successfully opened database</p>');
//SQL statements
//check for username
$Query="SELECT * FROM users WHERE uname='$uName'";
$QueryResult=@mysqli_query($Conn,$Query);
$NumRows=@mysqli_num_rows($QueryResult);
if($NumRows!=0){
//return error, username already in use
$Message='Error, username is already in use. Please choose another.';
return $Message;
}
else{
//if username isn't found, add user
$Query="INSERT INTO users(password,uname,fname,lname,email) VALUES('$Password','$uName','$fName','$lName','$Email')";
$QueryResult=@mysqli_query($Conn,$Query);
$Message='Successfully Added User. Your Account Will Be Activated Soon.';
return $Message;
}//end else
}//end of Register() function
?>
Thanks again y'all

New Topic/Question
Reply



MultiQuote





|