Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding a EULA to existing registration page.

Status
Not open for further replies.

msdbsql

Technical User
Nov 22, 2004
39
0
0
US
I have a website that requires a user agreement before completing registration. Currently the register.php does not have it. The user wants to trigger the agreement (terms.php) to come up when the user clicks on the register button. They would need to agree to the terms to continue processing the paypal payment or it should show some error page that says you must register to continue.

I already have the registration page built with the connections to paypal. I need to insert this feature. I have been working with several programmers on this project and the person that designed this page is no longer available. Can someone tell me how I would insert this feature based on the code below?
Or is it a separate function all together?

function registerUser()
{

$first =$_POST['first'];
$last =$_POST['last'];
$company =$_POST['company'];
$addr1 =$_POST['addr1'];
$addr2 =$_POST['addr2'];
$city =$_POST['city'];
$state =$_POST['state'];
$zip =$_POST['zip'];
$phone =$_POST['phone'];
$email =$_POST['email'];
$type =$_POST['type'];
$uname =$_POST['uname'];
$pass1 =$_POST['pass1'];
$payment =$_POST['payment'];

$now=date('YmdHis');
$sqlstr="INSERT INTO users (name_first,name_last,company_name,address,address2,city,state,zip,phone_number,email_address,user_name,password,reg_type,reg_date) VALUES ('"
.$first ."','"
.$last ."','"
.$company ."','"
.$addr1 ."','"
.$addr2 ."','"
.$city ."','"
.$state ."','"
.$zip ."','"
.$phone ."','"
.$email ."','"
.$uname ."','"
.$pass1 ."','"
.$type ."','"
.$now ."')";

// echo "<br>SQL:$sqlstr<br>";

$result=mysql_query($sqlstr);
if (mysql_errno()!=0)
{ echo "<br>DB error on registration:".mysql_error(); exit(); }

echo "<br>You have successfully registered.";
}
function completeRegistration()
{
$id=$_GET['cm'];

$sqlstr="SELECT name_first,name_last FROM users WHERE id=$id";
$result=mysql_query($sqlstr);
if (mysql_errno()!=0)
{ echo "<br>DB error completing registration:".mysql_error(); exit(); }
$row=mysql_fetch_assoc($result);
echo "<br>Thank you, ".$row['name_first']." ".$row['name_last'].", you may<br>now log in using your user name and password.";
}
 
you are correct, it is a completely different function altogether!
 
Ok. Can someone provide some direction on how I would create such a function?
 
if you post source code to all related pages, i could work it out for you. if you do not wish to post publicly, i can give you my email address upon request
 
Yes that would be greatly appreciated. If you like you can send me an email directly through my site I am uncertain if you can post email addresses in this forum.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top