Jump to content

Caliente

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Everything posted by Caliente

  1. I've spent another few hours trying to get the iterative loop to work with no success, so since the survey is sequential, guess I'll have to resort to creating individual pages with just the picture being different. Then I can set the Action attribute for each submit button to post to the next page in the series, which will both write that result to the database and set up the next picture. There are over 70 pictures in all, so I was hoping not to have to do it the long way.
  2. Yeah, I'm not sure why she needs it that way, but figured I could pretty much write any value to the database if I can get the loop working? I know the defaults would be easier for sure.
  3. Thanks for the reply. I'm helping a friend who needs to do this survey for her thesis, and she told me for her analysis she needed to use Yes as 1 and No as 2, so that's how I had to assign them. I set up the page trying to use an iterative loop and tried both an IF and FOR statement, but my results were that either all 12 questions and pictures were shown at once, or only one was (which is correct) but I couldn't get the Yes or No button to step through to the next question. I'm not very familiar with cookies at this point and am wondering if there's a way to use a loop to keep it simple? And my user name is just the name of our sailboat, it's all I could think of at such a late hour, and after many failed attempts to get the loop working. I meant no offense by it and will change it if you can tell me how.
  4. I'm new to PHP and attempting to set up my first interactive site that is a basic survey for little kids to take. There's a picture shown to them and two submit buttons below the pic, one reads YES and the other NO to register whether they've participated in the activity before or not. Since the only thing that changes on the page after the selection is made is the photo for the next question/activity, I'd like to be able to use the two buttons to both send their choice to a database (Yes=1 and No=2) and also increment a counter so I can update the picture on the page as they progress through the survey. All the information I've searched/read so far on submit buttons and multiple page surveys doesn't use the actual button itself as data but it's used to submit information gathered elsewhere on the page to another php page for processing via the Action attribute, so I'm wondering if what I want can be done. I'm leaving the Action attribute blank for each button as I want to stay on the same page and attempting to use an incremental counter to update the picture on the page in order to "step" through the survey each time one of the two buttons is clicked, but not having any luck and would appreciate suggestions or points in the right direction on the best way to do this. Apologies in advance if this seems like a basic question, and thanks for any suggestions you can offer.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.