Skip to main content
Participant
June 8, 2006
Question

Convert PHP

  • June 8, 2006
  • 1 reply
  • 273 views
I have a PHP page that receives data from a Flash application Quiz. It receives teh scores, grade, name, and badge number of the person taking the quiz after they hit the Submit button.

Here is my code on my .php page:
<?PHP

//these two lines determine the percentage the officer scored on the quiz
$totalquestions = $_POST[officerCorrect] + $_POST[officerIncorrect];
$percentage = $_POST[officerCorrect] / $totalquestions;

$to = "myemail@isp.com";
$subject = "Flash Training Score Submission";
$message = "\n\nModule: " . $_POST[officerModule];
$message .= "\n\nOfficer Name: " . $_POST[officerName];
$message .= "\n\nBadge: " . $_POST[officerBadge];
$message .= "\n\nScore: " . $percentage * 100;
$headers = "From: myemail@isp.com";
$headers .= "\nReply-To: myemail@isp.com";

//Do not edit these two lines
$sentOk = mail($to,$subject,$message,$headers);

echo "sentOk=" . $sentOk;

?>

What I would relly like to do is use a non-server side app to receive this quiz data and forward that to my email address. I found out that my Host Server does not and will not have server side apps available.

How can I convert my .php page to a standard .htm type page that will also receive this data and forward it to my email account.

Thanks for any help.
This topic has been closed for replies.

1 reply

Inspiring
June 8, 2006
Are you saying your host doesn't have PHP on their server?

You couldn't do this with an htm page, you need some form of server side
script to receive the data and mail it to you whether its PHP, ASP or a CGI
script. If your host doesn't cater for any of these then you`ll need to
change to a different host.

Gareth
http://www.phploginsuite.co.uk/
PHP Login Suite V2 - 34 Server Behaviors to build a complete Login system.


Participant
June 9, 2006
Thanks. I did find out that my host has enabled ASP server side apps. My problem is that I don't have the experience to convert my php page to an asp page. I'll have to read up on asp and see what I need to convert the php tp asp.

Again, Thanks for your input.