Re: Php Survey(Questionnaire), Need Help!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You have 2 basic options for getting info from forms:
1. $_POST['name_of_form_field']
2. $_GET['name_of_form_field']

There is a third option: $_REQUEST[], but if you use it all the fury  
of hell and PHP nerds everywhere will be unleashed upon you. (In  
other words, don't use it.)

To check that the form was submitted, you'll use isset(), so  
something like this:
if (isset($_POST['name_of_a_hidden_field']))

The basic logic there is "If 'name_of_hidden_field' has a value, that  
must mean the form was posted." I also like to check and make sure  
the form request came from the server the page was on since you can  
send all of that stuff to your page from a totally different site.

After that, it all boils down to form validation and what you want to  
do with the information.

I'd google "PHP forms" -- it will net you all sorts of tutorials.  
Then you can come back here and post your code for us to laugh at...  
I mean assist you with. :)
--
Joe

On May 7, 2009, at 8:09 AM, BBX wrote:

>
>
> well in html i know how to work but in php i don't :(
>
> --- On Wed, 5/6/09, Joe Forsythe <jforsythe@xxxxxxxxxxxxxxxxxx> wrote:
>
> From: Joe Forsythe <jforsythe@xxxxxxxxxxxxxxxxxx>
> Subject: Re:  Php Survey(Questionnaire), Need Help!
> To: php-objects@xxxxxxxxxxxxxxx
> Date: Wednesday, May 6, 2009, 10:00 PM
>
> Do you know how to work with forms?
>
> --
>
> Joe
>
> On May 6, 2009, at 2:13 AM, Anghelina Liviu wrote:
>
> >
>
> >
>
> > Hi People, I just joined the group, and I need some help! I have to
>
> > create an online questionnaire system, and really don't know how to
>
> > create a questionnaire in php, to have option to insert the
>
> > question and the answer, and the type of answer, also edit the
>
> > question after insert it, or delete it!
>
> > I hope I make my self clear!
>
> > I have an example here, a google online questionnaire :
>
> > http://spreadsheets .google.com/ gform?key= rI3AfNr9nF07EdiI Zdt-
>
> > QYw&hl=en#edit
>
> >
>
> > Best Regards, Liviu


[Non-text portions of this message have been removed]


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux