I have several web pages created that captures information from user inputs and stores them into session variables in PHP tags inside the html. Finally I echo back the values from the session all on the same page and ask the user if all inputs are correct. I would like to include a submit button at the bottom of the page for the user to submit the session values into the database. I am not sure how to take the values from inside the current page in session variables and store to database. Here is an example of code I currently have.
<?php
session_start();
$name = $_SESSION['name'];
echo "<br>Is this name right?: ".$name;
?>
I have already created the database and respective columns. I am familiar with storing values in form submission, however I have always done this by embedding a file in the form action and obtaining the values using $_POST[”] to get values of inputs of current form.
So, in your queries, just substitute $_POST with $_SESSION. Or am I missing something?