Jump to content

PHP email form


SylntKnight1

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

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.