Html and php test

I have been sent a test that I am to add to a website

The test is multiple choice and buttons are selected.

I have added it here using html from the folder they provided.

Thats all fine but now I need to add the results … which is a php doc which counts the results and you select from that the answer… Not sure how to do this … I dint know how to add the php doc or link it to the test page

Hard to say without seeing the code, but my guess since php runs server side, would be that you would send the form data to the php processing via a POST using Ajax or a similar method.

Hi swilliam THANKS!

I feel like I am close.
The read me file says
2) Update test.html

  • You need to tell test.html where to find the scoring script, score.tcl or
    score.pl. To do so, on line 12 of test.html, change the action field of
    the tag to the URL for score.tcl (for TCL) or score.pl (for PERL).

    For example, if you copied score.tcl to /var/www/cgi-bin/rheti_cgi-bin,
    and the relative URL for it is /cgi-bin/rheti_cgi-bin/score.tcl, then the

    tag should look like this:

But im not sure where / how I should have the score.php

Without seeing the code, I would try uploading the php file to the same folder as the page and modifying that line in the html file accordingly. It sounds like they already have the POST communications taken care of.

If that doesn’t work, you will have to share the file so I can see what’s going on.

YAY! Thank you swilliam ! Got it !

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.