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?
Converting numbers to months
The porgram works -just need the last function(month_convert_ to convert numbers to months -thanks.
ORA-01655: unable to extend cluster SYS.C_FILE#_BLOCK# by 128
Hi all,Oracle 10g. Linux.I'm facing the below error while trying to import a dumpfileIMP-00003: ORACLE error 604 encounteredORA-00604: error occurred at recursive SQL level 1ORA-01655: unable to
Do While statement
hi guys,This may sound trivial but im new to php and as part of an assignmenti have to construct the 10 green bottles song using the do while statement. I can do the statement but it is itengrating
How do I send data using an html link
HiIf I have <a href="main_file.php">How do I send data to main_file.php I have a group of links that are created on the fly and I want to give each link a value so that I can
help retrieiving results and doing pagination
Having some trouble trying to get the results to show on more than just one page. What is happening is that when i input a subject or zip code, i get results and links on the bottom to show the number
Session
I am having a little trouble with a session. Not sure if it is my browser or what. I know I do not have any trouble logging into forums such at these, so not sure why this is not working.first the
i have no idea why this isn't working
Code: <?phpsession_start();include("connect.php");error_reporting(E_ALL);ini_set('display_errors', '1'); $username = "Master";$password = "pword";$host =
article site help remaining text
Hi all hope you will be fineI am creating a article site in this site i want to put some text on main page and link it via "read more" text from articles page and complete article will be
Update Database
Hi All,I have a problem with this:Code: [Select]<?phpsession_start();include('../common/dbconnect.php');$stock_id = $_GET['stock_id'];$query='SELECT * FROM users_stocks WHERE user_id ="' .
PO Release Strategy Issue
Hi Experts,