![]() | |
![]() |
| | Thread Tools | Display Modes |
#11
| |||
| |||
|
#12
| |||
| |||
|
|
topb - I just learned how to do this -- here is what someone sent me. You have to create two pages, an html page with the form and a php page to direct the results -- that is, if I understand what is going on correctly. At any rate, it works! I attached the code but am not sure if it will come over correctly, since this program replaces some of the tags. Send me an email at daveficks (AT) justmysites (DOT) com and I'll forward the attachment to you that explains this. Dave Below is a simple PHP email example. Two files are created, form.html which holds a simple email submission form and email.php which is the page that gets processed when the form is submitted. In the email.php file, you'll notice we set the $msg variable = to some text and $email_address. PHP can reference any submitted form field from the previos page (in this case "email_address") on the processing page as $VARIABLE_NAME. So what we are doing is including the address in the message we are sending to whomever we are sending it to! The best way to get this is to play around a bit and see the results. Either way, PHP is a much better solution than legacy CGIs for doing this! Let me know if I can help! ----- form.html ---- form action="email.php" method="post" b>Email Address:</b input type="text" name="email_address" size="30" maxlength="75" input type="submit" value="Submit" /form ---- email.php ---- ?php $to = "whoever (AT) wherever (DOT) com"; $subj = "your subject"; $msg = "your message\n\n".$email_address; $from = "From: address (AT) domain (DOT) name (whoever you want it to come from)"; mail($to,$subj,$msg,$from); ? Thank you for submitting! |
![]() |
| Thread Tools | |
| Display Modes | |
| |