user input php
Posted: Tue Sep 15, 2009 5:31 pm
Hello Im relatively new to php and i was wondering what is the best way to handle user input?
Essentially i want to prompt the user for a server, user, psswd, and port and when they submit the input my php code will attempt to connect and if the connection is a success then go to the next page, if the connection is not a success stay on the first page and print an error message.
I was going to use $_POST and post the input to the same page, but i want to know if there is a better convention i should be following?
thanks for any advice
Essentially i want to prompt the user for a server, user, psswd, and port and when they submit the input my php code will attempt to connect and if the connection is a success then go to the next page, if the connection is not a success stay on the first page and print an error message.
I was going to use $_POST and post the input to the same page, but i want to know if there is a better convention i should be following?
thanks for any advice