![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Web Design & Programming Discussion of web design, and server-side & client-side scripting |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
TSF Enthusiast
Join Date: Nov 2004
Posts: 555
OS: Windows XP Pro & Windows Vista Ultimate browsing the web with FF, Opera, Safari and IE.
|
Mailform: how to put e-mail input as 'from' e-mailaddress?
L.S.,
I'm using a php-script to receive e-mails from my website. At the moment, everything (name, e-mail, and message) is coming in the message of the e-mail send in which 'httpd' is used a the sender' e-mailaddress. Is there a way to automatically use the e-mailaddress that users fill in the contactform as the senders address in the e-mail I receive? Contactform can be found here Php-script used here: Code:
<?
$Naam = $_REQUEST['Naam'] ;
$Email = $_REQUEST['Email'] ;
$Bericht = $_REQUEST['Bericht'] ;
if (!isset($_REQUEST['Email'])) {
header( "Location: http://www.kleurenblindheid.nl/kleuren/contact.html" );
}
elseif (empty($Naam) || empty($Email) || empty($Bericht)) {
?>
<html>
<head><title>Foutje?</title></head>
<body>
<h1>Foutje</h1>
<p>
Naam vergeten? Email adres vergeten? Geen bericht ingevuld? Ga terug met de 'TERUG'-knop en probeer het nogmaals!
</p>
</body>
</html>
<?
}
else {
mail( "contact@kleurenblindheid.nl", "Contact Formulier",
$Naam, $Bericht, "From: $Email" );
header( "Location: http://www.kleurenblindheid.nl/kleuren/contact2.html" );
}
?>
Thanks for the help!
__________________
KoosHopeloos, straight to you from .nl via the world wide web! ![]() |
|
|
|
| Important Information |
|
Join the #1 Tech Support Forum Today - It's Totally Free!
TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free. Join TechSupportforum.com Today - Click Here |
|
|
#2 (permalink) |
|
Design Team Member
|
Re: Mailform: how to put e-mail input as 'from' e-mailaddress?
PHP Code:
It looks like it's in the wrong place...this is the setup of the mail function: PHP Code:
Try this out and see if it works out for you: PHP Code:
|
|
|
|
|
|
#3 (permalink) |
|
TSF Enthusiast
Join Date: Nov 2004
Posts: 555
OS: Windows XP Pro & Windows Vista Ultimate browsing the web with FF, Opera, Safari and IE.
|
Re: Mailform: how to put e-mail input as 'from' e-mailaddress?
@ Redcore: Thanks helping a PHP-newbie, I now have the e-mailaddress the user filled in a the sender e-mailaddress! One final question though: the name and message (yes, that is the translation of Bericht ;)) are now directly behind each other without spaces. Can it be done like this:
----- Name -Blank line- Message (Bericht) ----- Thanks again! Greetz,
__________________
KoosHopeloos, straight to you from .nl via the world wide web! ![]() |
|
|
|
|
|
#4 (permalink) |
|
Design Team Member
|
Re: Mailform: how to put e-mail input as 'from' e-mailaddress?
Sure can...I should have wrote it with that to begin with really.
PHP Code:
|
|
|
|
|
|
#5 (permalink) |
|
TSF Enthusiast
Join Date: Nov 2004
Posts: 555
OS: Windows XP Pro & Windows Vista Ultimate browsing the web with FF, Opera, Safari and IE.
|
Re: Mailform: how to put e-mail input as 'from' e-mailaddress?
@ Redcore: thanks a lot again! Didn't expect it to be so easy... Tried a couple of things, but not this.
__________________
KoosHopeloos, straight to you from .nl via the world wide web! ![]() |
|
|
|
|
|
#6 (permalink) |
|
Design Team Member
|
Re: Mailform: how to put e-mail input as 'from' e-mailaddress?
Don't I know it! Programming is very much trial & error, especially if you're still new. I break code at least 70% of the time - I had to learn pretty quickly that it's broken because I did something wrong, not because it's stupid or just won't do it HAHA! I've cussed out my monitor many times - and then felt really stupid when I realized that I simply misspelled a critical word or variable. :P
|
|
|
|
|
|
#7 (permalink) |
|
Design Team Member
|
Re: Mailform: how to put e-mail input as 'from' e-mailaddress?
WOOPS...
I just realized I put HTML in that update ... not the PHP one. PHP Code:
Sorry about that! Just wasn't paying attention :P |
|
|
|
|
|
#8 (permalink) |
|
TSF Enthusiast
Join Date: Nov 2004
Posts: 555
OS: Windows XP Pro & Windows Vista Ultimate browsing the web with FF, Opera, Safari and IE.
|
Re: Mailform: how to put e-mail input as 'from' e-mailaddress?
@ Redcore: Can happen! Thanks again!
__________________
KoosHopeloos, straight to you from .nl via the world wide web! ![]() |
|
|
|
![]() |
| Thread Tools | |
|
|