472,145 Members | 1,417 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,145 software developers and data experts.

Form Mail Question

I'm desperatrely trying to work out the perl syntax for taking a value from
a form field and putting it in another web page for example:

"Hello world my name is $my_name_field."

I know that this is the wrong syntax but I'm damned if i can work out what
it REALLY is.
It's probably something really simple.

Please let me know either by posting here (I DO check) or email:
we*@magic2k.com
Thanks.

--
¿ Trigger ?
http://www.magic2k.com/
http://www.oddmap.co.uk
Jul 19 '05 #1
2 1599
"Neil Trigger" <em***@magic2k.com> wrote in message
news:5f*******************@news-binary.blueyonder.co.uk...
I'm desperatrely trying to work out the perl syntax for taking a value from a form field and putting it in another web page for example:

"Hello world my name is $my_name_field."

I know that this is the wrong syntax but I'm damned if i can work out what
it REALLY is.
It's probably something really simple.

Please let me know either by posting here (I DO check) or email:
we*@magic2k.com
Thanks.

--
¿ Trigger ?
http://www.magic2k.com/
http://www.oddmap.co.uk

Could you possibly include more code on what you are trying to do? Right now
I'm fairly unclear. That current code would print out $my_name_field, but
first you need to make sure you are actually processing your form so that
$my_name_field has a value from the form. If that's what you need to do, I'd
recommend cgi.pm (not sure if this is what you're still needing to do, but
I'll briefly go over it). To get the information from the previous webpage,
all you would need to do would be:

use CGI;
$query = new CGI;

$my_name_field=$query->param('whatever_your_form_field_box_name_is_here' )

print "Content-Type: text/html\n\n"; #it is possible to print your headers
with CGI.pm, but I won't go into that

print "$my_name_field."

#end

CGI.pm gets much more complex than that, and can pretty much handle your
webpages completely from generation to processing. I personally don't use it
for everything, but the features are there. For more on CGI.pm goto
http://stein.cshl.org/WWW/software/CGI/ where you will find massive amounts
of documentation telling you what you want to know.
Jul 19 '05 #2
Wow. I knew it was something simple, but I never realised it was THAT
simple.
it works fine now Nick, thank you so much!

--
¿ Trigger ?
http://www.magic2k.com/
http://www.oddmap.co.uk
Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by John | last post: by
2 posts views Thread by Bad Little Kyle | last post: by
1 post views Thread by cartoonsmart | last post: by
Chrisjc
1 post views Thread by Chrisjc | last post: by
5 posts views Thread by Henry Stock | last post: by
reply views Thread by Saiars | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.