Jump to content

JonathanAvfcJones

New Members
  • Posts

    5
  • Joined

  • Last visited

JonathanAvfcJones's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. sorry about that i have been away for a few days this is what i have : html/javascript <img src="Images/Question1.png" usemap="#mainMap" id="main" style="position:absolute;display:none;left:0px;top:0px;" border="0" /> <map name="mainMap" id="mainMap"> <area shape="rect" coords="82,192,196,242" onclick="incorrectAnswer()" /> </map> function incorrectAnswer() { document.getElementById("answer_id").value=id; document.forms["answer_send"].submit(); } <form id="answer_send" name="answer_send" action="answersend.php" method="POST"> <input type="hidden" id="answer_id" name="answer_id" value="10"/> <input type="submit" value="Submit" /> </form> php $id=$_POST['answer_id']; echo $id
  2. Okay so I'm confused and lost and have no idea of what I am doing, basically here is some of my code: HTML/Javascript: onclick="incorrectAnswer() function incorrectAnswer() { document.getElementById("answer_id").value=id; document.forms["answer_send"].submit(); } <form id="answer_send" name="answer_send" action="answersend.php" method="POST"> <input type="hidden" id="answer_id" name="answer_id" value="10"/> <input type="submit" value="Submit" /> </form> PHP: $id=$_POST['answer_id']; echo $id when i done this in the answersend.php page as it loads on the server the page is blank, I have no idea why this is not working any ideas/help?
  3. Ah okay this is making sense a bit i didn't understand about the href or the server side but i am doing research on them and the PHP Manual helped a little bit but still confused, someone recommended that to do this use a forum and POST and the server checks to see weather it is correct or not i have no idea on how to test this as im still learning the lanuage, any help on this subject.
  4. I understand where you are coming from, the thing im going to find hard is figuring out the functions as well as the GET or POST i now know aboyt tge html tags to php that was quite useful but i am still confused on the subject, i apologies for this as im just learning all of this, any more help on the subject/examples would help out, thanks for your comment.
  5. Hello, I am new to php i was wondering if anyone can help me basically i have been assigned to create a database where you have four questions and four answers and the database should display the four questions and next to them would say "incorrect" or "correct" if you click on the button if this makes sense here is my html code but I have no idea on how get php to place it into the database, i tried to use Div/ID tags to help but i haven't got a clue what i am doing <img src="Images/Question1.png" usemap="#mainMap" id="main" style="position:absolute;display:none;left:0px;top:0px;" border="0" /> <map name="mainMap" id="mainMap"> <div id="Incorrectanswer1"><area shape="rect" coords="82,192,196,242" onclick="incorrectAnswer()" /></div> <div id="Incorrectanswer2"><area shape="rect" coords="83,254,197,300" onclick="incorrectAnswer()" /></div> <div id="Incorrectanswer3"><area shape="rect" coords="83,310,201,368" onclick="incorrectAnswer()" /></div> <div id="Correctanswer1"><area shape="rect" coords="84,373,205,430" onclick="correctAnswer()" /></div> </map> if anyone could help or point me in the right direction this would be helpful. Thanks, Jonathan Jones
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.