473,406 Members | 2,954 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

creating a complex form

I am having trouble inserting more then one row into a mysql database.
this is what I won't to do.

I am setting up a survey to see what customers think of the hotels we
booked for them. A form shows all the hotels booked by us voor a
perticulair client sorted by hotel. Next to it is a radio group
(example: excellent - good - not good)

The list of hotels booked by the client is show with a repeat region.
Following problems need to be overcome

1. per listed hotel the buttongroup needs to know its a new row
2. clients need to judge (via de selection of radio buttons in the
radio button group) how they feel the hotel was
3. to confirm the clients presses 1 submit button and the data is
added to the database

Hope anyone can help

Table where the data must be inserted looks like

surveyID (auto increases)
offerteID (hidden form var)
hotelID (hidden form var)
rateID (radio button group) values are 1 (excellent) 2 (good) 3
(avereage) 4 (below average) 5 (bad)
remarks (formfield)
Aug 7 '08 #1
3 1345
On 7 Aug, 16:00, "i...@gozuidafrika.com" <i...@gozuidafrika.com>
wrote:
I am having trouble inserting more then one row into a mysql database.
this is what I won't to do.

I am setting up a survey to see what customers think of the hotels we
booked for them. A form shows all the hotels booked by us voor a
perticulair client sorted by hotel. Next to it is a radio group
(example: excellent - good - not good)

The list of hotels booked by the client is show with a repeat region.
Following problems need to be overcome

1. per listed hotel the buttongroup needs to know its a new row
2. clients need to judge (via de selection of radio buttons in the
radio button group) how they feel the hotel was
3. to confirm the clients presses 1 submit button and the data is
added to the database

Hope anyone can help

Table where the data must be inserted looks like

surveyID (auto increases)
offerteID (hidden form var)
hotelID (hidden form var)
rateID (radio button group) values are 1 (excellent) 2 (good) 3
(avereage) 4 (below average) 5 (bad)
remarks (formfield)
What have you tried? What were the problems. If you want me to design
this from scratch, what's your budget?
Aug 7 '08 #2
On Aug 7, 8:00 am, "i...@gozuidafrika.com" <i...@gozuidafrika.com>
wrote:
I am having trouble inserting more then one row into a mysql database.
this is what I won't to do.

I am setting up a survey to see what customers think of the hotels we
booked for them. A form shows all the hotels booked by us voor a
perticulair client sorted by hotel. Next to it is a radio group
(example: excellent - good - not good)

The list of hotels booked by the client is show with a repeat region.
Following problems need to be overcome

1. per listed hotel the buttongroup needs to know its a new row
2. clients need to judge (via de selection of radio buttons in the
radio button group) how they feel the hotel was
3. to confirm the clients presses 1 submit button and the data is
added to the database

Hope anyone can help

Table where the data must be inserted looks like

surveyID (auto increases)
offerteID (hidden form var)
hotelID (hidden form var)
rateID (radio button group) values are 1 (excellent) 2 (good) 3
(avereage) 4 (below average) 5 (bad)
remarks (formfield)
You need to use arrays read in your db rows into fields, to set up
your form and retrieve your data.

so SurveyID would be SurveyID[1]-SurveyID[20] or whatever.

Aug 7 '08 #3
On Aug 7, 5:00*pm, "i...@gozuidafrika.com" <i...@gozuidafrika.com>
wrote:
Following problems need to be overcome

1. per listed hotel the buttongroup needs to know its a new row
2. clients need to judge (via de selection of radio buttons in the
radio button group) how they feel the hotel was
3. to confirm the clients presses 1 submit button and the data is
added to the database
With this HTML:

<form method="POST" action="bla.php">

<input type="radio" name="rating[0]" value="bad">Bad
<input type="radio" name="rating[0]" value="average"Average
<input type="radio" name="rating[0]" value="good"Good
<br />

<input type="radio" name="rating[1]" value="bad">Bad
<input type="radio" name="rating[1]" value="average"Average
<input type="radio" name="rating[1]" value="good"Good
<br />

<input type="radio" name="rating[2]" value="bad">Bad
<input type="radio" name="rating[2]" value="average"Average
<input type="radio" name="rating[2]" value="good"Good
<br />
<input type="submit"/>
</form>
The data in $_POST will become something like this:

Array
(
[rating] =Array
(
[0] =bad
[1] =bad
[2] =good
)

)
Aug 8 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Max | last post by:
Suppose we have an object hierarchy in XSD. For example, let us take Control, Label, TextBox and LinkLabel windows controls. Each control has some properties which are represented as elements....
5
by: Ilan Sebba | last post by:
When it comes to adding records in related tables, Access is really smart. But when I try to do the same using ADO, I am really stupid. Say I have two parent tables (eg Course, Student) and one...
3
by: DataBard007 | last post by:
My Access 97 database has a form that contains text boxes that display people's names, addresses, phone numbers, etc. The record source is a single table. I created a NextRecord and Previous...
8
by: Oenone | last post by:
Is it possible to create an object which can have methods and properties, but which can also be treated as a string? I'm trying to create a wrapper around the IIS Request.Form object which...
3
by: Asad | last post by:
Hi, I am trying to write my first Windows application using VB.NET and I am having some difficulties designing the UI. Basically its one Windows Form with 4 menus on the top (no drop downs)....
3
by: Russ | last post by:
I'd like to get output formatting for my own classes that mimics the built-in output formatting. For example, >>> x = 4.54 >>> print "%4.2f" % x 4.54 In other words, if I substitute a class...
5
by: SalamElias | last post by:
I am creating several chkBoxes dynamically and assigning an event handler in the Page_load as foillows ***************************** Dim chkCatOption As CheckBox = New CheckBox chkCatOption.Text...
17
by: Lee Harr | last post by:
I understand how to create a property like this: class RC(object): def _set_pwm(self, v): self._pwm01 = v % 256 def _get_pwm(self): return self._pwm01 pwm01 = property(_get_pwm, _set_pwm)
1
by: Eric | last post by:
Hi, I have a form that should be restricted to some users. I want to create a password form that requires a password to access that form. Can someone help guide me on how to create one? Thanks!
1
by: John | last post by:
Hi Is it possible to enumerate all controls on a form and then save the info in an xml file via code? Is it possible to reverse the process i.e. read info from and xml and recreate all controls...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.