I retrieve data with the post method as below
$no_wa1= $_POST['no_wa'][0];
$no_wa2= $_POST['no_wa'][1];
$no_wa3= $_POST['no_wa'][2];
then I want to display the data above with a while loop and a for loop
I want to enter it into the database
I retrieve data with the post method as below
$no_wa1= $_POST['no_wa'][0];
$no_wa2= $_POST['no_wa'][1];
$no_wa3= $_POST['no_wa'][2];
then I want to display the data above with a while loop and a for loop
I want to enter it into the database
2
Answers
Let me help you step by step. Following is the HTML file which has form and 3 inputs.
You have not mentioned whether you have setup the DB connection or not, so this code is to establish a Database connection.
Retrieve Form Data so that you can use that variable in your loops
Insert data in Database by using While Loop:
Insert data in Database by using For Loop:
Close the Statement and Connection:
Something like that would probably do what you want :