Send Data from One Page to Another Page in PHP

Google Advertisements

Display Date and Time in PHP Exception Handling in PHP

Transfer Data from One Page to Another Page in PHP

To transfer data from one web page to another webpage we need Html form and using action="" we transfer form data on another page.

Using $_POST['field_name'] we receive form data on another page in PHP if method is post in case of get method use $_GET['field_name'];.

index.html

Html page

<form action="display.php" method="post" id="nameform">
First Name: <input type="text" name="fname"></br>
Last Name: <input type="text" name="lname"></br>
<button type="submit" form="nameform" value="submit">Submit</button>
<button type="reset" value="Reset">Reset</button>
</form>

display.php

Receive form data on other page

<?php

$first_name = $_POST['fname'];
$last_name = $_POST['lname'];

echo $first_name;
echo $last_name;

?>

When you fill html form all data will be transfer from index.php to display.php


Display Date and Time in PHP Exception Handling in PHP

Google Advertisements

Buy This Ad Space @$50 per Month, Ad Size 600X200 Contact on: hitesh.xc@gmail.com or 8076671483

Pure VPN Privide Lowest Price VPN Just @ $1.65. Per Month with Non Detected IP Lowest Price Non Detected IP VPN

Magenet is best Adsense Alternative here we earn $2 for single link, Here we get links ads. Magenet

Cloud computing is the on demand availability of computer system resources, especially data storage and computing power, without direct active management by the user. Cloud Computing Tutorial

College Projects Related to Java, AWT, C Projects for College, C++ Projects for College, Android Projects. Download Java C C++ Projects

Download Projects

Adsense Advertisements


Buy This ads Space 8076671483

Buy This Ad Space @$120 per Month, Ad Size 300X600 Contact on: hitesh.xc@gmail.com or 8076671483 Try this Keyword C++ Programs