CGI Development

Moderators: Jonathan
Number of threads: 55
Number of posts: 121

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Pulling a NAME field from a form to a redirect page... Posted by sheshi on 14 Nov 2003 at 6:01 PM
Hi All,

I think this is an easy question for you.... thanks in advance for any help.

I created a registration form on my website. All I'm trying to do is capture the first name field on my redirect page to say something like "Thank you 'First_Name' for registering....."

I started out using an ASP code however using my web hosting site, my registration form was created with the following code:

____________________________

<form action="http://eatontown411.com/ipw-cgi/forms.cgi"
method="post"
enctype="application/x-www-form-urlencoded" name="RegForm"
____________________________

So, it's using CGI scripts.... ASP is not available....
Any suggestions on what code I can use to pull the first name field on my redirect page?

Please be gentle, I have never used CGI scripts before... hope this makes sense. And thanks!

-Sheryl
Report
Re: Pulling a NAME field from a form to a redirect page... Posted by Jonathan on 14 Nov 2003 at 6:21 PM
: Any suggestions on what code I can use to pull the first name field
: on my redirect page?
:
: Please be gentle, I have never used CGI scripts before... hope this
: makes sense. And thanks!
It all depends on how the CGI is written and what features it offers. It's hard to help without knowing what language the CGI script is written in or what it is; if you can provide any extra info that would be helpful.

Jonathan


###
for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
(tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
/(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");

Report
Re: Pulling a NAME field from a form to a redirect page... Posted by sheshi on 14 Nov 2003 at 7:03 PM
Ok, I'll give it a shot. Here is the code for the form:
___________________
<form action="http://eatontown411.com/ipw-cgi/forms.cgi"
method="post"
enctype="application/x-www-form-urlencoded" name="RegForm" id="RegForm">
<table> <tr>
<th width="193" align="right"><font color="#FFFFFF">
First Name:
</font></th>
<td width="182">
<input type="text" name="First_Name" size="30" />
</td>
</tr>
<tr>
<th align="right"><font color="#FFFFFF">
Last Name:
</font></th>
<td>
<input type="text" name="Last_Name" size="30" />
</td>
</tr>
<tr>
<th align="right"><font color="#FFFFFF">
Street Address:
</font></th>
<td>
<input type="text" name="Street_Address" size="30" />
</td>
</tr>
<tr>
<th align="right"><font color="#FFFFFF">
City, State, Zip:
</font></th>
<td>
<input type="text" name="City_State_Zip" size="30" />
</td>
</tr>
<tr>
<th align="right"><font color="#FFFFFF">
Email:
</font></th>
<td>
<input type="text" name="Email" size="30" />
</td>
</tr>
<tr>
<th align="right"><font color="#FFFFFF">
How did you hear about us?</font></th>
<td>
<input type="text" name="How_did_you_hear_about_us" size="30" />
</td>
</tr>
<tr>
<th><font color="#FFFFFF"></font></th>
<td>
<div align="center">
<input type="submit" name="Submit" value="Submit" />
</div></td>
</tr>
</table>
<input type="hidden" name="_ipwformid" value="546" />
</form>
______________________________________

When a user hits the submit button, they get directed to another page on my site. I would like that redirect page to pull the first field on this form to say "Thank you 'First_Name' for registering..."


Does that help you to answer my question at all?

Thanks!
-Sheryl
______________________________________


: : Any suggestions on what code I can use to pull the first name field
: : on my redirect page?
: :
: : Please be gentle, I have never used CGI scripts before... hope this
: : makes sense. And thanks!
: It all depends on how the CGI is written and what features it offers. It's hard to help without knowing what language the CGI script is written in or what it is; if you can provide any extra info that would be helpful.
:
: Jonathan
:
:
: ###
: for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
: (tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
: /(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");
:
:

Sheshi

Report
Re: Pulling a NAME field from a form to a redirect page... Posted by Jonathan on 17 Nov 2003 at 6:11 AM
: Ok, I'll give it a shot. Here is the code for the form:
: ....
: ______________________________________
:
: When a user hits the submit button, they get directed to another
: page on my site.
OK, so where did you specify the page they get redirected to? Did you edit a .cgi file at some point?

: I would like that redirect page to pull the first
: field on this form to say "Thank you 'First_Name' for registering..."
:
: Does that help you to answer my question at all?
No, I meant the script you're using to send the form - but I'm wondering if you're using something provided by your web host. If you did edit a .cgi file, as form mailing scripts are often not all that short, I suggest you email it to me rather that posting the entire content of the script on here. If it's one set up by your host, do you have the ability to install/run your own .cgi scripts?

Jonathan

###
for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
(tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
/(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");

Report
Re: Pulling a NAME field from a form to a redirect page... Posted by sheshi on 17 Nov 2003 at 4:37 PM
: : Ok, I'll give it a shot. Here is the code for the form:
: : ....
: : ______________________________________
: :
: : When a user hits the submit button, they get directed to another
: : page on my site.
: OK, so where did you specify the page they get redirected to? Did you edit a .cgi file at some point?
:
: : I would like that redirect page to pull the first
: : field on this form to say "Thank you 'First_Name' for registering..."
: :
: : Does that help you to answer my question at all?
: No, I meant the script you're using to send the form - but I'm wondering if you're using something provided by your web host. If you did edit a .cgi file, as form mailing scripts are often not all that short, I suggest you email it to me rather that posting the entire content of the script on here. If it's one set up by your host, do you have the ability to install/run your own .cgi scripts?
:
: Jonathan
:
________________
Hi Jonathan, thanks for the response. And yes, the file was set up by my host. I do have the ability to run my own scripts... what's a good next step?

THANKS!!
Sheryl
Sheshi

Report
Re: Pulling a NAME field from a form to a redirect page... Posted by Jonathan on 17 Nov 2003 at 5:54 PM
: Hi Jonathan, thanks for the response. And yes, the file was set up
: by my host. I do have the ability to run my own scripts... what's a
: good next step?
Use this:-
http://soupermail.sourceforge.net

Give it a go yourself, post again if you get stuck. You can set up templates for output after the form is submitted and include fields, just as you want.

Jonathan

###
for(74,117,115,116){$::a.=chr};(($_.='qwertyui')&&
(tr/yuiqwert/her anot/))for($::b);for($::c){$_.=$^X;
/(p.{2}l)/;$_=$1}$::b=~/(..)$/;print("$::a$::b $::c hack$1.");

Report
Re: Pulling a NAME field from a form to a redirect page... Posted by infidel on 17 Nov 2003 at 7:17 AM
: Ok, I'll give it a shot. Here is the code for the form:
: ___________________
: <form action="http://eatontown411.com/ipw-cgi/forms.cgi"

With a file named "forms.cgi" in what appears to be a fairly global path on the server, I would guess the sysadmins have placed all of the CGI available to users into this one file. A rather bold assumption, but it wouldn't be surprising if webpages are automatically generated.

To put it bluntly, unless you can edit the above file, or create your own CGI script in a folder that the webserver will recognize as executable, you'll have to live with whatever functionality you are given by the server admins.


infidel




 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.