Thread: PHP Form Help
Results 1 to 6 of 6
Related
-
required form fields in php page using redirect.php form Forum: PHP Forum
Replies: 1 -
Disable/Enable form features based on form selections Forum: Javascript Forum
Replies: 4 -
Problem with form in IE6 - empty space at end of form Forum: HTML Forum
Replies: 1 -
Form Handling Script for 'Tell A Friend' Form Forum: Javascript Forum
Replies: 1 -
Want to have data in form appear elsewhere in same form Forum: HTML Forum
Replies: 3
-
04-19-2009, 01:05 PM #1
PHP Form Help
Hi,
I'm using the mailer.php posted in this thread:
http://www.ahfb2000.com/webmaster_help_desk/showthread.php?t=583&highlight=mailer.php
Everything is working great and I like the simplicity of the script. However, I would like to change 1 option from the script so that when I receive an email it should display the sender's email address instead of what is typed at this line:
$from = "From: My Website Emailer";
Is this possible?
Thanks,
Ken
-
04-20-2009, 01:41 AM #2
Re: PHP Form Help
Try to replace the code that you've pointed with:
Code:$from = "From: ".$_POST['Email'];
Checkout my porfolio.
Please click thebutton when a member helped you.
Take time to use Forum's Search function.
-
04-20-2009, 02:24 AM #3
Re: PHP Form Help
I gave it a try, but the Sender shows up as blank. Thunderbird flashed the incoming sender as "undefined."
-
04-20-2009, 02:34 AM #4
Re: PHP Form Help
It's best indication is that you don't have a field whose name is Email in your form.
Try to recheck your markup. Ensure that the name of the "email textbox" matches that of the POST's key.
Hope that makes sense.Checkout my porfolio.
Please click thebutton when a member helped you.
Take time to use Forum's Search function.
-
04-20-2009, 02:39 AM #5
Re: PHP Form Help
rangana,
Thank you so much for your help. I changed the name from "email" to "Email" like you've pointed it out and it works now. Thanks again!
-
04-21-2009, 10:05 AM #6
Re: PHP Form Help
This is a recommendation for all PHP programming. As PHP is case sensitive (i.e. "Email" and "email" are two completely different words and not related at all), it is good practice to at least start everything in lowercase. The exception to that is constants. This will provide consistency throughout the code making it easier to read, understand, and maintain.
Cloudjiffy- PaaS for Developers
10-05-2020, 12:30 AM in Web Hosting Forum