I have php forms on all of my websites that work fine, but when I try to use the sendresults.php on my intranet the submit button attempts to Open/Save the file instead of performing the actions in the PHP and emailing it to me.
But, when I post the same exact html and php file on the internet, it works fine. What do I need to tweak to get it to work on my intranet?
Here’s a summary of the html, without the blah blah blah…
.....(blah blah blah)And here is the php
<?php $subject = 'Request for Additional Training'; $emailadd = '[email protected]'; $url = '\\server01\intranet\index1.html'; $req = '1'; $text = "Additional Training Request:\n\n"; $space = ' '; $line = ' '; $nm=gethostbyaddr($REMOTE_HOST); foreach ($_POST as $key => $value) { if ($req == '1') { if ($value == '') {echo "$key is empty";die;} } $j = strlen($key); if ($j >= 20) {echo "Name of form element $key cannot be longer than 20 characters";die;} $j = 20 - $j; for ($i = 1; $i <= $j; $i++) {$space .= ' ';} $value = str_replace('\n', "$line", $value); $conc = "{$key}:$space{$value}$line"; $text .= $conc; $space = ' '; } mail($emailadd, $subject, $text, 'From: '.$emailadd.''); $email = $_POST['Email']; $subject = 'Training Will Be Scheduled Shortly'; $text = 'generic text emailed to submitter '; mail($email, $subject, $text, 'From:'.$emailadd.''); echo ''; ?>