RE: PHP assistance needed --
by Klaas De Waele <klaas(at)grace.be>
|
| Date: |
Tue, 22 Oct 2002 08:47:49 +0200 |
| To: |
"'Davies, Elizabeth H.'" <EHDavies(at)West.com>, "HWG-technique Mailing List (E-mail)" <hwg-techniques(at)hwg.org> |
| |
todo: View
Thread,
Original
|
|
Here you go
$sql = "INSERT INTO onscreen SET " .
"Message='$login logged in', " .
"User='$login', " .
"Type='login'";
(part of my PHP chatengine)
- Kayjey -
www.fiatcoupe.net
-----Original Message-----
From: Davies, Elizabeth H. [mailto:EHDavies(at)West.com]
Sent: Monday, October 21, 2002 6:25 PM
To: HWG-technique Mailing List (E-mail)
Subject: PHP assistance needed --
My graphics-oriented brain is not seeing something... I simply can't handle
array's
I have a 70 question survey and am passing an array of answers, 10 at a
time....(radio buttons with the name of q_ans1, q_ans2 etc)
Questions...
1. a or b
2. a or b
...
10. a or b ... form submit
I need to insert the current 10 into a database table, with a table layout
of:
--- p_key (the person submitting the survey)
--- q_num (the question number)
--- q_ans (the answer, either a or b)... and then continue to the next 10.
I just can't handle the split... ::: sigh :::
I got this far (X is passed from the form and will start at 1 on the first
page):
for (i=X;i<=X+10;i++) {
SOME METHOD TO SPLIT UP THE ANSWERS from variables q_ans1, q_ans2,
q_ans3....q_ans70
$query = "INSERT INTO is_survey_astd
(p_key, q_num, q_ans)
VALUES
('$p_key','$i','$q_ans')";
}
First off the FOR statement blows up with
Parse error: parse error, unexpected '=', expecting ';' in
/wic/intranet/istrain_survey/survey.php on line 12 (this is the for
statement line)
Can anyone assist? point me to an online example of this? keep me from
having my brain melt? ::: whimper :::
Elizabeth Davies
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA
This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.