OK, so I have many quizzes which previously worked fine on my http:// website, using AJAX javascript calls to a php mailer program to send data about the quiz and mail it to the recipient. I have upgraded the site to https:// and now none of the scripts work. The bones of the javascript are contained in the following function:
function postIt() {
var http = new XMLHttpRequest();
var url = "../mail/summary.php";
var params = "realname="+myName+"&rightAnswers="+correct+"&percentageScore="+percentage+"&wrongArray="+wstore+"&asked="+numq+"&mins="+minutes+"&secs="+seconds+"&deliver="+destination+"&testName="+test;
http.open("GET", url+"?"+params, true);
http.onreadystatechange = function() { //Call a function when the state changes.
if(http.readyState == 4 && http.status == 200) {
//alert(http.responseText);
}
}
http.send(null);
}
The php mailer receives the variables and mails them. Again the bones of the php are below:
$data1=$_GET["realname"];
$data2=$_GET["rightAnswers"];
$data3=$_GET["asked"];
$data4=$_GET["mins"];
$data5=$_GET["secs"];
$data6=$_GET["percentageScore"];
$data7=$_GET["deliver"];
$data8=$_GET["testName"];
$myWrongArray = explode(',', $_GET["wrongArray"]);
$sendTo = "results@ibchem.com".", ".$data7;
$subject = $data8." summary results for ".$data1;
The code is fine for http:// websites (I have tested it again on http://mypchem.com/test) but fails on https://ibchem.com/test.
My level of understanding is pushed to the limit as I can code (average) in javascript, html, css, php etc. but have no idea how to solve this problem.
Any help please?
Charco