Jump to content

Form Sending .php


ghi572000

Recommended Posts

Hi I have a html form page linked to a .php page for sending me and the user the data entered in to the from:

Part of the code for example purposes:

 

HTML SIDE

<form method="post" action="thankyou.php">

 

<?php

$ipi = getenv("REMOTE_ADDR");

$httprefi = getenv ("HTTP_REFERER");

$httpagenti = getenv ("HTTP_USER_AGENT");

?>

 

<input name="visitormail" type="text" size="25" />

 

<input name="button" type="submit" id="button" value="Send" />

</form>

 

PHP SIDE SENDING

<?php

$visitormail = $_POST['visitormail'];

 

$from = "From: $visitormail\r\n";

$from = "Cc: $visitormail\r\n";

 

mail("[email protected]", $subject, $message, $from);

 

?>

 

What is happening is the incoming mail is coming in to me and to the user from "[email protected]" but from my ISP domain?

 

After lots of searching I have come up with the answer that I should be using "PHP mail() and SMTP Authentication" ?

 

Is this the case and if so how do I set up SMTP Authentication as I am new to php!!!!!

 

Thanks

Gary

:confused:

 

Link to comment
https://forums.phpfreaks.com/topic/220848-form-sending-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.