How to transfer form data from one html page to another?

Viewed 106

I have a registration page, having 3 columns username, email, and password. Login Page, consisting of 2 columns email and password now I want to show the username of the corresponding email while logging into the page. Note- I just want to know how can I fetch the value entered in email to another page.

Thanks in Advance!!

2 Answers

you can get user information like this

sessionService.loadUser().then(user => console.log(user));

you could do this:

page1.php:

<form action="page2.php" method="POST">
    <input type="text" name="name" />
    <input type="text" name="surname" />
    <input type="button" value="Click Me">
</form>

Then once you submit the form the file page2.php will receive the form field values in this way;

page2.php

if($_POST){
    var_dump($_POST);
}

good luck!

Related