Perl

Moderators: Jonathan
Number of threads: 1259
Number of posts: 3644

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

Edit Report
Mail sending & HTML forms... Posted by Vegard on 5 Aug 2000 at 5:53 PM
First, is this the right way to determine which radio button in a form is checked?<br>
<br>
if ($fields{'choice'} eq "choice1")<br>
{ &send_1; exit; }<br>
if ($fields{'choice'} eq "choice2")<br>
{ &send_2; exit; }<br>
<br>
Second, if i have a form submitting the first half of a e-mail address (the part before @), how do i add the part after the @ if i know the domain?<br>
<br>
Thanks...


Edit Report
Re: Mail sending &amp; HTML forms... Posted by J. Worthington on 6 Aug 2000 at 12:01 PM
Hi!<br>
<br>
: First, is this the right way to determine which radio button in a form is checked?<br>
: <br>
: if ($fields{'choice'} eq "choice1")<br>
: { &send_1; exit; }<br>
: if ($fields{'choice'} eq "choice2")<br>
: { &send_2; exit; }<br>
That looks correct to me. As long as the radio buttons carry the values "choice1" and "choice2"!<br>
<br>
: Second, if i have a form submitting the first half of a e-mail address (the part before @),<br>
: how do i add the part after the @ if i know the domain?<br>
I would probably use the . to join the two together. For example, if the first half was stored in the variable $address, you would do something like this:<br>
$address = $address."\@domain.com";<br>
(Remember to put \@ instead of just @, or it thinks @domains is an array - not good!)<br>
<br>
Hope this helps - drop me an email if you have any more problems!<br>
<br>
J. Worthington


URL:http://www.downloadcounter.com/




 

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.