How can i store data from php form? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How can i store data from php form?

I want to store data after filling form in php to database

14th Dec 2016, 4:16 PM
Nitish Kumar
Nitish Kumar - avatar
2 Answers
+ 1
well usually if you have an html form to be filled out the form elements will have id's that you can post to your server where the php can access these values via the global $_Post variable then you can open your db connection and insert the values into your table using stored procedures W3scools.com has some examples for php forms
14th Dec 2016, 4:41 PM
Cory Clapp
Cory Clapp - avatar
+ 1
Here are some steps that might help you. 1. Save all the data in $_POST array. 2. Validat all the data that has been posted. 3. Make sql query that uses INSERT INTO command and use the values from $_POST array into you command to store data into your database. 4. Run the query using mysqli_query($query);
27th Dec 2016, 3:53 AM
Raniket Ram
Raniket Ram - avatar