seanog Posted November 23, 2006 Share Posted November 23, 2006 Hi,I have this php code, which alerts me by email when someone does an online test, giving me their IP address and score. But how can I get the user to enter their name and email address, and then press submit , and then they would find out their score and I would also receive the same information - score , name and email address? Thanks [code]$to = "[email protected]; $subject = "Someone scored ". $score . " over ". $scoremax . "."; $headers = "MIME-Version: 1.0 \r\n" ; $headers .= "Content-Type: text/plain \r\n"; $headers .= "Cc: \r\n"; $headers .= "From: <[email protected]>"; $origin = "\nThe guy is ". $_SERVER['REMOTE_ADDR'] . "\n"; $body = $subject . $origin; mail($to, $subject, $body, $headers . "\r\nBCC: [email protected]");[/code]and the html page [code]<form action="test1.php" method=post><p>My name<SELECT name="question1"><OPTION value=na><OPTION value=A>is<OPTION value=B>are<OPTION value=C>it is<OPTION value=D>it etc. <input type="submit" name="submit" value="Result"><br><br> <input type=reset value=Clear> </form>[/code] Link to comment https://forums.phpfreaks.com/topic/28228-return-mail-for-php-test/ Share on other sites More sharing options...
seanog Posted November 23, 2006 Author Share Posted November 23, 2006 Or...how could I fix the code so that the user would get the result of the test by return (automatic) email? Link to comment https://forums.phpfreaks.com/topic/28228-return-mail-for-php-test/#findComment-129207 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.