sh0tgun Posted November 19, 2006 Share Posted November 19, 2006 Hi!I'm looking for some code that can save data entered into 2 text boxes once the user clicks submit.Please help. Thanks in advance. Quote Link to comment https://forums.phpfreaks.com/topic/27781-need-some-code/ Share on other sites More sharing options...
jwk811 Posted November 19, 2006 Share Posted November 19, 2006 i dont understand what you're trying to do... Quote Link to comment https://forums.phpfreaks.com/topic/27781-need-some-code/#findComment-127107 Share on other sites More sharing options...
roopurt18 Posted November 19, 2006 Share Posted November 19, 2006 Well here goes...No one is going to write your code for you. This forum is intended to help people who are stuck on their own code and seeking help.Why don't you give it some effort on your own and post where you get stuck.Otherwise this belongs in the freelancing forum. Quote Link to comment https://forums.phpfreaks.com/topic/27781-need-some-code/#findComment-127120 Share on other sites More sharing options...
wildteen88 Posted November 19, 2006 Share Posted November 19, 2006 If you mean how do you get the data from the form when you submit it. Then you get it form the $_POST or $_GET superglobal variables. You use $_POST if you use the POST method (method="post") or GET if you dont use the POST method or if you have not set the method in your form tag.Once you know which variable to use you then prefix with ['field_name_here'] like so: $_POST['field_name_here']So if you have a textarea called 'name':[code]<input type="text" name="name">[/code]Then you access the data from that field using $_POST['name']. You can then echo that variable out to see the contents. Quote Link to comment https://forums.phpfreaks.com/topic/27781-need-some-code/#findComment-127127 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.