Silly php question

  • Thread starter Thread starter fez
  • Start date Start date

fez

fez

Caporegime
Joined
22 Aug 2008
Posts
28,053
Location
Tunbridge Wells
I am building a questionnaire system that allows a user to create a custom questionnaire offline and have that questionnaire automatically generated online ready for the customer to fill in and submit. The issue that I am having is that when I submit the form, any answers that have been left blank by the customer are not posted.

What I want is to be inserting X number of rows into the DB for each questionniare regardless of how many of the X questions are actually answered.

I could obviously get around this by writing a little php but I was wondering if I am missing a really simple way of doing this.

Thanks for the help, much appreciated.
 
Hmm, I'm not sure what you're asking but it sounds like you may have to go back and take a look at your database design. How is it currently structured?
 
That will depend on whether the PHP code that reads the form data back is the cause of the missing blank data, Or as Russinating has said, it could be the DB.

I would 1st start by debugging the PHP code that handles the form data reading and SQL construction. See where that leads. It maybe something simple as a loop iterating the form elements and checking to see if they are not empty.
 
Back
Top Bottom