Hello
On my page i use header() function to go to other php pages.
Example: page1.php
.....some code.....header("location: http://mypage/page2.php\r\n");
but i would like to call page2.php with 'some parameters' so i could
show page2.php and fill some data according to page1.php values.
Is it possible ? How can i do it ?
Thanx
values/parameters between php scripts ?
Moderator: General Moderators
- scorphus
- Forum Regular
- Posts: 589
- Joined: Fri May 09, 2003 11:53 pm
- Location: Belo Horizonte, Brazil
- Contact:
Call page2.php using a query string:
and on page2.php use the$_GET predefined var:
Take a look to [php_man]variables.predefined[/php_man] ($_GET)
Hope that helps,
Scorphus.
Code: Select all
header("location: http://mypage/page2.php?userId=234&product=65\r\n");Code: Select all
echo $_GET['userId'] . '<br />';
echo $_GET['product'] . '<br />';Hope that helps,
Scorphus.