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("forum@domain.co.uk", $subject, $message, $from);

 

?>

 

What is happening is the incoming mail is coming in to me and to the user from "forum@domain.co.uk" 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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.