Click here to Skip to main content
15,915,089 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In php how datas are passes from one page to another page. Anyone help me for this...
Posted

You can do this either by adding hidden fields to your HTML page that are then passed along to the next page that will be called via a form submit from the client (i.e. browser). You can also use session to achieve the same: PHP Manual: Sessions[^]. Please also read the documentation on the functions to be used with sessions: Session Functions[^].

The best point to start though would seem to be this if you have never used sessions before or don't even know what a session is: Introduction to Sessions[^]

[Edit]
Another way to pass data along to the next page is URL rewriting on the client side.
[/Edit]

Regards,

Manfred
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 16-Mar-12 11:41am    
My 5.
--SA
you can use POST or GET

HTML
<form action="welcome.php" method="get">
Name: <input type="text" name="fname" />
Age: <input type="text" name="age" />
<input type="submit" />
</form> 


in PHP

PHP
Welcome <?php echo $_GET["fname"]; ??>.<br />
You are <?php echo $_GET["age"]; ??> years old! 


Try this tutorial
PHP Tutorial[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900