CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
urgent question

 



Mitchell Rietdijk
Deleted

Jan 30, 2000, 11:59 AM

Post #1 of 5 (836 views)
urgent question Can't Post

Hello, I need some help with this.
I use this line in a script:

$name = "$INPUT{'name'}";

So $name returns what the visitor filled in this formfield, but now $name returns nothing. What did I wrong or what did I forgot. I really have no clue.

I also tried $FORM{'name'} but also with no results. Please answer here or e-mail me at mitchell@quicknet.nl


brian.hayes
User

Jan 30, 2000, 4:51 PM

Post #2 of 5 (836 views)
Re: urgent question [In reply to] Can't Post

How are you parsing your input? You may need to look at the parsing of user input in your program. Also check and make sure the form name is correct, just in case something change unexpectedly.


Brian Hayes


brian.hayes
User

Jan 30, 2000, 4:56 PM

Post #3 of 5 (836 views)
Re: urgent question [In reply to] Can't Post

Also,

CGI.pm offers some clean ways to get the user's input.

Your form has a text box:

<BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR>


<FORM method="post" action="program.pl">
<INPUT TYPE=TEXT name="name" SIZE=7>
</pre><HR></BLOCKQUOTE>

your script:

<BLOCKQUOTE><font size="1" face="Arial,Helvetica,sans serif">code:</font><HR>


#!/path/to/perl

use CGI;
my $q = new CGI;

$name = $q->param('name');

....more code........
</pre><HR></BLOCKQUOTE>

now "name" will be what ever was sent to the script via a form.


Let me know if this helps.

Brian Hayes


Mitchell Rietdijk
Deleted

Feb 1, 2000, 12:14 PM

Post #4 of 5 (836 views)
Re: urgent question [In reply to] Can't Post

Thank you very much... using new CGI really works.. my e-mail has just arrived in my mailbox.

When i have questions next time, i'll ask it here.

Greetings, Mitchell Rietdijk


brian.hayes
User

Feb 1, 2000, 6:07 PM

Post #5 of 5 (836 views)
Re: urgent question [In reply to] Can't Post

Glad to help out and Thank you for the remarks. Success makes it worth while..

Thanks again,

Brian Hayes

 
 


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives