Jump to content

Recommended Posts

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]

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

  • 2 weeks later...

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.

Link to comment
https://forums.phpfreaks.com/topic/231037-php-email-form/#findComment-1193461
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.