PHP code not running on friends internal network
Posted: Mon Jun 22, 2009 2:28 pm
hi,
i have created a survey web page using xhtml, javascript for client side validation and php for server side validation, logic, database updates and to send an email notification that the survey has been completed.
the whole thing works fine on my laptop and pc and my friend's home pc's however on the charity's internal network the html page displays and javascript validation works fine however when the submit button is pressed, configured as below, nothing happens-
the code in mainsub.php is a long php file responsible for updating the db and sending an email etc therefore i have put an example of each php type, function and methods i have used below. my assumption is that a setting or restriction has been applied by the network administrator. i do not wish to change a network setting in case people using the survey have the same issue. therefore i wish to fix this problem by changing a setting/s on my web server (apache), php.ini file or removing/changing a function in order to comply with the network settings or whatever is causing the code not to run.
i have created a survey web page using xhtml, javascript for client side validation and php for server side validation, logic, database updates and to send an email notification that the survey has been completed.
the whole thing works fine on my laptop and pc and my friend's home pc's however on the charity's internal network the html page displays and javascript validation works fine however when the submit button is pressed, configured as below, nothing happens-
Code: Select all
<form action="mainsub.php" method="post">
<form id="form1" name="form1" method="post" action="">
...html form code for radio button's, text areas etc
<input type="submit" name="SUBMIT" id="SUBMIT" value="Submit" accesskey="s" />
Code: Select all
$rating = Array(0=>'Strongly Agree',
1=>'Agree',
2=>'Neutral',
3=>'Disagree',
4=>'Strongly disagree');
// Get all $_POST variables
foreach($_POST as $var => $val) { ${$var} = $val; }
$response8bTel = "tel8b_".$rank1_5[$tel8bGroup];
$body_body .= "----------------------------------------------------\n";
$to = 'jim <james@########.co.uk>';
$subject = 'Website Survey Results';
$body = $body_body.$body_footer;
mail($to, $subject, $body);
echo '<div style="white-space: pre">';
print_r(str_replace("\n", "<br />",$body));
echo '</div>';