The following script checks to see if the user answer matches the correct answer.
Form Fields are set up the following way...
user_answer[$i] | value = a
user_answer[$i] | value = b
user_answer[$i] | value = c
all radio fields (above)
orgid[$i] | value = $i
answer[$i] | value = (a or b, c)
all hidden fields (above)
$i = question id/number
Basically when question answer isn't selected an undefined offset error message is generated. Adding if empty or isset messes up the order.
Code: foreach ($_POST['orgid'] as $k =>$v) {
$orgid[$k] = $v;
}
$k = 0;
$m = 0;
while ($k <= 19) {
if ($_POST['user_answer'][$k] == $_POST['answer'][$k]) {
$correct++;
unset ($_POST['user_answer'][$k]);
unset ($orgid[$k]);
} else {
$incorrect++;
}
$k++;
}
Any ideas/suggestions?
Multi image upload
I have a gallery to build and want to build a dynamic upload form to allow for $var number of fields but have a 30 sec execution limit on my host. im looking for advice on how to loop thrue up to 8
Help with lottery style system?
I'm working on a currency system for forums and it is going to have a type of lottery system built into it. Trying to figure out the best way to make the drawings work. I'm still new to cron jobs but
Is this possible? If one file assigned to an ID...
I have a page that lists property listings assigned to a specific user (a manage page), with brief text details and a picture.Each of these listings has several images with it, that aren't seen unless
$get problem
Hi Guys ... can you please tell me what i am doing wrong hereCode: <?php $ShowBookmark = "False"; include 'Include/Header.php'; if (Get_QString('Post') == "True") {
please, need help coding this voting for your favorite car polling system.
hi, my code needs a lot of work, but i want to be able to let users vote on their favorite car, update the database, and display the new updated data for the top ten cars listed. i want to prevent
GET * FROM _____ Except?
I have a site that is for stock photography.This section of the code calls images to display on the main page, based on several variables (new images, featured images, most downloaded, highest rated,
Remove letter from numeric textbox
I have a textbox that will search the employee database by entering in the employee ID and it will return the result on the same page.QueryCode: if(isset($_GET['findagentid']) &&
Storing Values taken from a DB...
Using this code it will generate a short list from my database <?phpmysql_connect('localhost','root','');mysql_select_db("clients");$fname = $_POST['firstname'];$SQL = "SELECT *
Please help understand this code
I noticed the index page on my site was modified this morning and found this code inserted at the bottom of the page:Code: <!--ddgbsre_erd_sdd--><?php
Any help with my email script?
I have an email script, I have not tested it, although someone tested it for me and said it worked fine. I started to make modifications to the code after using the basic structure. This is my HTML