Jump to content

thinkthrice

Members
  • Posts

    7
  • Joined

  • Last visited

thinkthrice's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I have managed to make it work,but it display the 3rd question...only the radio buttons,its only up to 2 stacks
  2. and btw,where did "qid" came from is it constant? im not really that familiar and im willing to learn
  3. thank you for your help sir,. but it still wont work, this statement is executed after i submit the answer if(mysqli_num_rows($qr)==0){ echo ("No record fetched...<br>"); }
  4. I'm really sorry about this, since i've only learnt HTML and not much CSS
  5. well this is the code im using <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR...nsitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title></title> </head> <body bgcolor="#330099"> <form id="formstart" name="formstart" method="GET" action="start2.php"> <?php //Include the connection details include ("connection.php"); //Create SQL query $query="select question,a,b,c,d from dummy"; //Execute the query $qr=mysqli_query($db,$query); if($qr==false){ echo ("Query cannot be executed!<br>"); echo ("SQL Error : ".mysqli_error($db)); } //Check the record effected, if no records, display a message if(mysqli_num_rows($qr)==0){ echo ("No record fetched...<br>"); }//end no record else{//there is/are record(s) while ($rekod=mysqli_fetch_array($qr)){//redo to next records echo $rekod['question']; echo '<input name="ans" type="radio" value="A" />' . $rekod['a']; echo '<input name="ans" type="radio" value="A" />' . $rekod['b']; echo '<input name="ans" type="radio" value="A" />' . $rekod['c']; echo '<input name="ans" type="radio" value="A" />' . $rekod['d'] . '<br>'; echo '<hr>'; } } ?> <input type="submit" name="submit" id="submit" value="SUBMIT"/> <?php ?> </form> </body> </html>
  6. ok sir i have this database which contains question i wanted to have a quiz where when i click proceed it goes to another question, as far as I've researched and done ive only managed to make the all the questions display there...the only problem i have now is to make the questions separated from each other
  7. Hello everyone, I am pretty new here on this site, I've been working on this for my school project about an online quiz exam...if you check my start.php file,its not sync..i was hoping when i press submit it goes to another question coming from the database but instead its properly ordered already, I know my work is way too complicated and not even near the finished product that i wanted thats why i wanted help here. So if possible i need assistance for some reason i cant upload my database here add1.php connection.php index.php new.css start.php view.php
×
×
  • 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.