Computer Science Canada

What are the different methods to take input from a user?

Author:  lastlegion [ Sun Jun 21, 2009 11:55 am ]
Post subject:  What are the different methods to take input from a user?

Hey I know that you can take input from a user via a html form and then use $_POST[] or $_GET[]
but is there any other way to get input without using html forms?

Author:  DtY [ Sun Jun 21, 2009 2:39 pm ]
Post subject:  RE:What are the different methods to take input from a user?

Not really, for web applications.
If you really want to, you can user javascript's confirm(); prompt(); et cetera, then send it back with ajax, but that's probably more than you'll want to do.

If you're doing console programming, you can get input from standard input.

Author:  jeffgreco13 [ Mon Jun 22, 2009 8:33 am ]
Post subject:  RE:What are the different methods to take input from a user?

maybe if u gave us an idea of what you want to do..

Author:  lastlegion [ Mon Jun 22, 2009 11:00 am ]
Post subject:  Re: What are the different methods to take input from a user?

Like in ruby gets can be used to take input from user. Is there anything of that sort in PHP?

Author:  DtY [ Mon Jun 22, 2009 11:53 am ]
Post subject:  RE:What are the different methods to take input from a user?

Not for web based development.
If you are interacting with the user via the command line (like you normally would in ruby), you can read from the file identifier STDIN using the normal file functions.


: