dan_t Posted March 9, 2009 Share Posted March 9, 2009 Hello, My question for today is: Say I have a form and it takes a user input from a text box named 'name'. How do I take the input from 'name' and make it a variable named $name? So that I can use it in an if else statement or whatever. Quote Link to comment Share on other sites More sharing options...
Stephen68 Posted March 9, 2009 Share Posted March 9, 2009 depends on if your form uses GET or POST //Get method $name = $_GET['name']; //Post method $name = $_POST['name']; Hope that helps Quote Link to comment Share on other sites More sharing options...
dan_t Posted March 9, 2009 Author Share Posted March 9, 2009 Hey Thanks stephan! I tried it earlier and it did not work. You posted it, I tried it again and it worked. I guess I was doing something wrong. Anyway, Thanks a lot!! Dan Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.