SylntKnight1 Posted March 18, 2011 Share Posted March 18, 2011 I am having some trouble. First is that I don't know php. And I am trying to finish someone else's work which is written in php. I figured out how to make the form send to an email address when the submit button is pressed. What I can't seem to figure out is how to make it tell me which site it's from. We have many agents, all of which have their own agent page and agent number. The agent number is in the URL for them, of course. In order to know which order is coming from which agent site, I would like to get the email to also include the URL of that agents page it is coming from. I've attatched the code for what I have so far. Can anyone please help? Thanks. [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/231037-php-email-form/ Share on other sites More sharing options...
possien Posted March 28, 2011 Share Posted March 28, 2011 A couple of suggestions. First you don't have any form validation to screen user input. I take it you are using Send Mail. You don't have $headers defined. You should look into the php manual on sendmail and some tutorials. Not all servers are alike. I sometimes upload this script to the server to see the Server variables: <?php echo '<table border="1">'; reset($_SERVER); while (list($key, $val) = each($_SERVER)) { echo "<tr><td>$key</td> <td>$val</td></tr>"; } echo '</table>'; ?> This will list all the variables in a table and you can see what variables suite your needs. Quote Link to comment https://forums.phpfreaks.com/topic/231037-php-email-form/#findComment-1193461 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.