Gossamer Forum
Home : Products : DBMan : Customization :

Sign Up Page Redesign

Quote Reply
Sign Up Page Redesign
On the page where my registrants sign up to access my DBMan database, I want to include a form to get their email address, their own web site (If they have one) and "How did you hear about us". Anyone know how I would do this?

Many thanks in advance!

The Rabbit

Quote Reply
Re: Sign Up Page Redesign In reply to
I suppose it depends on whether you want to store the info collected in the database or just use it on-the-fly.

If you wanted to email the results to yourself for example, you just use the information submitted within the Signup-success sub routine..

What are you thinking of doing?

Cheers!
Ben
------------
http://www.travel-experiences.com
Quote Reply
Re: Sign Up Page Redesign In reply to
When they sign up at the registration page I want to have them fill out the other mentioned info and have it emailed to me.

Quote Reply
Re: Sign Up Page Redesign In reply to
Ok, on the SIGNUP_FORM sub, add the fields you want passed on, such as:

<input type="text" name="email" value="email">
<input type="text" name="email" value="homepage">
<input type="text" name="email" value="referal">
<input type="checkbox" name="CONSENT" value="1" CHECKED>

Then in SIGNUP_SUCCESS,

Add a few lines such as:

###send user details email#####
if ($in{'CONSENT'} eq "1") {
open (MAIL, "$mailprog") or &cgierr("Can't start mail program");
print MAIL "To: youraddress\@isp.com\n";
print MAIL "From: $in{'email'}\n";
print MAIL "Subject: goes here\n\n";
print MAIL "New user details:\n";
print MAIL "Name: $in{'userid'}\n";
print MAIL "Email: $in{'email'}\n";
print MAIL "Homepage: $in{'homepage'}\n";
print MAIL "Referred by: $in{'referral'}\n\n";
print MAIL "Add any other text here\n";
close MAIL;
}

this should work. If you want you can add an option so that these details are only emailed to you if the user consents. This bit is in red, so if you don't want it, just delete the red bits.

Hope that helps! Wink

Cheers!
Ben
------------
http://www.travel-experiences.com
Quote Reply
Re: Sign Up Page Redesign In reply to
Thanks Ben. I will stick that in atry it tonight.

Quote Reply
Re: Sign Up Page Redesign In reply to
You might want to modify these field slightly:

<input type="text" name="email" value="email">
<input type="text" name="email" value="homepage">
<input type="text" name="email" value="referal">

change to:

<input type="text" name="email" value="email">
<input type="text" name="homepage" value="homepage">
<input type="text" name="referal" value="referal">

Smile

Quote Reply
Re: Sign Up Page Redesign In reply to
Ok, OK it was late at night! Wink

Cheers!
Ben
------------
http://www.travel-experiences.com
Quote Reply
Re: Sign Up Page Redesign In reply to
benseb:

I can relate most of the time when I'm answering questions it's 3:00 a.m. and I've been up for many hours Smile

Just wanted to be sure that got caught. It was great you were able to answer the question Smile

Quote Reply
Re: Sign Up Page Redesign In reply to
You all have been extremely helpful and I thank you very much!

Quote Reply
Re: Sign Up Page Redesign In reply to
OK I put the following in and it is setup and shows right:

sub html_signup_form {
# --------------------------------------------------------
# This form is displayed for new users who want to create an account.
#
my $error = shift;

&html_print_headers;
print qq|
<html>
<head>
<title>$html_title: Create Account.</title>
</head>
<body bgcolor="#DDDDDD" background="http://www.XXX/XXX/XXX.jpeg" text="#000000" onLoad="document.form1.userid.focus()">
<form action="$db_script_url" method="post" name="form1">
<input type=hidden name="db" value="$db_setup">
<input type=hidden name="uid" value="$db_uid">
<center><img src="http://www.XXX/XXX/XXX.gif" width="250" height="65" alt="XXXX">
<table border=1 bgcolor="#FFFFFF" cellpadding=5 cellspacing=3 width=500 align=center valign=top>
<tr><td colspan=2 bgcolor="navy">
<FONT FACE="MS Sans Serif, arial,helvetica" size=1 COLOR="#FFFFFF">
<b>$html_title: Create Account</b>
</td></tr>
<tr><td>
<p><center><$font_title>
<b>Create Account</b></font></center>

<$font>To create your own account, simply enter in your desired username and password.
<p>|; if ($error) { print "<font color=red>$error</font></p>"; } print qq|
<table border=0>
<tr><td><Font face="Verdana, Arial, Helvetica" Size=2 Color=#003399><b>User ID:</b></FONT></td>
<td><input type="TEXT" name="userid" value="$in{'userid'}"></td></tr>
<tr><td><Font face="Verdana, Arial, Helvetica" Size=2 Color=#003399><b>Password:</b></FONT></td>
<td><input type="PASSWORD" name="pw" value="$in{'pw'}"></td></tr>
<tr><td><Font face="Verdana, Arial, Helvetica" Size=2 Color=#003399><b>Your Email:</b></FONT></td>
<td><input type="TEXT" name="email" value="$in{'email'}"></td></tr>
<tr><td><Font face="Verdana, Arial, Helvetica" Size=2 Color=#003399><b>Your Homepage:</b></FONT></td>
<td><input type="TEXT" name="homepage" value="$in{'homepage'}"></td></tr>
<tr><td><Font face="Verdana, Arial, Helvetica" Size=2 Color=#003399><b>Referred By:</b></FONT></td>
<td><input type="TEXT" name="referral" value="$in{'referral'}"></td></tr>
</table>
<p align=center><center><input type="SUBMIT" name="signup" value="Create"> <INPUT TYPE="SUBMIT" NAME="logoff" VALUE="Cancel"></center></p>
</td></tr>
</table>
</center>
</form>
</body>
</html>
|;
}

------------------------------------------------------------

But where in the Signup_Success do I put the other part? Here is what the signup success looks like, so where in it do I put what is after the divider below?

sub html_signup_success {
# --------------------------------------------------------
# The user has successfully created a new account.

&html_print_headers;
print qq|
<html>
<head>
<title>$html_title: Account Created.</title>
</head>
<body bgcolor="#DDDDDD" background="http://www.XXXXX/XXX/XXXX" text="#000000" onLoad="document.form1.userid.focus()">
<form action="$db_script_url" method="post" name="form1">
<input type=hidden name="db" value="$db_setup">
<input type=hidden name="uid" value="$db_uid">
<center><img src="http://www.XXXXXX/XXXX/XXXX" width="250" height="65" alt="XXXXXXXX">
<table border=1 bgcolor="#FFFFFF" cellpadding=5 cellspacing=3 width=500 align=center valign=top>
<tr><td colspan=2 bgcolor="navy">
<FONT FACE="MS Sans Serif, arial,helvetica" size=1 COLOR="#FFFFFF">
<b>$html_title: Account Created</b>
</td></tr>
<tr><td>
<p><center><$font_title>
<b>Account Created</b></font></center>

<$font>Your account has been set up! Use your username and password to log in.
<p>
<table border=0>
<tr><td><Font face="Verdana, Arial, Helvetica" Size=2 Color=#003399><b>User ID:</b></FONT></td>
<td><input type="TEXT" name="userid"></td></tr>
<tr><td><Font face="Verdana, Arial, Helvetica" Size=2 Color=#003399><b>Password:</b></FONT></td>
<td><input type="PASSWORD" name="pw"></td></tr>
</table>
<p align=center><center><input type="SUBMIT" name="login" value="Logon"> <INPUT TYPE="SUBMIT" NAME="logoff" VALUE="Cancel"></center></p>
</td></tr>
</table>
</center>
</form>
</body>
</html>
|;
}
-----------------------------------------------------
where does this go?

{
open (MAIL, "$mailprog") or &cgierr("Can't start mail program");
print MAIL "To: XXX\@XXXX\n";
print MAIL "From: $in{'email'}\n";
print MAIL "Subject: goes here\n\n";
print MAIL "New user details:\n";
print MAIL "Name: $in{'userid'}\n";
print MAIL "Email: $in{'email'}\n";
print MAIL "Homepage: $in{'homepage'}\n";
print MAIL "Referred by: $in{'referral'}\n\n";
print MAIL "Add any other text here\n";
close MAIL;
}

------------------------------------------------------

Quote Reply
Re: Sign Up Page Redesign In reply to
sub html_signup_success {
# --------------------------------------------------------
# The user has successfully created a new account.

open (MAIL, "$mailprog") or &cgierr("Can't start mail program");
print MAIL "To: XXX\@XXXX\n";
print MAIL "From: $in{'email'}\n";
print MAIL "Subject: goes here\n\n";
print MAIL "New user details:\n";
print MAIL "Name: $in{'userid'}\n";
print MAIL "Email: $in{'email'}\n";
print MAIL "Homepage: $in{'homepage'}\n";
print MAIL "Referred by: $in{'referral'}\n\n";
print MAIL "Add any other text here\n";
close MAIL;

&html_print_headers;
print qq|
<html>
<head>......



Cheers!
Ben
------------
http://www.travel-experiences.com
Quote Reply
Re: Sign Up Page Redesign In reply to
Darn! It gives me the error message and does not work. I am at a loss here. Thanks for helping, Ben.

Quote Reply
Re: Sign Up Page Redesign In reply to
It should work now, you were missing the $mailprog variable in your cfg file

Cheers!
Ben
------------
http://www.travel-experiences.com