chris4321 Posted October 7, 2006 Share Posted October 7, 2006 I have a form, when i hit sumbit it shows the value of the textbox, now i want to use the value of the textbox in other statements within my php page, without retyping it. I had a look but i cant get a clear answer. Can anyone help me Quote Link to comment Share on other sites More sharing options...
corbin Posted October 7, 2006 Share Posted October 7, 2006 you could use javascript to grab the contents of the textbox if it doesnt need to be used server side... or you could store it in a file, or preserve the $_POST var set by it... Quote Link to comment Share on other sites More sharing options...
ImTomScott Posted October 7, 2006 Share Posted October 7, 2006 Yes like Corbin had said if you want to carry it over and store it in a database or compare the information you would use the following:Say this is your form on your 'text.html' file page. My example is a userName.<input type="text" name="userName" />On the page that your trying to put it into a variable you would have it as$userName = $_POST['userName'];It doesn't have to necessarily be userName you can make it whatever you want username, text, whatever you would like. 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.