•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 456,468 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,813 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 2990 | Replies: 3
![]() |
•
•
Join Date: Oct 2005
Location: Harare, Zimbabwe
Posts: 34
Reputation:
Rep Power: 4
Solved Threads: 2
code in login page is:
how do i get the data from the variable in index page after redirect from login page
header("Location: index.php?$page");how do i get the data from the variable in index page after redirect from login page
•
•
•
•
code in login page is:
header("Location: index.php?$page");
how do i get the data from the variable in index page after redirect from login page
You mean the $page value? Or some other variable? If you mean $page (which I assume is a name-value pair like "var=someValue", if not then you aren't sending it correctly) then in index.php you can read it from the request as
$var=$_GET['var'];If this is not what you are asking about, please reply with a little bit more detail on the question.
•
•
Join Date: Oct 2005
Location: Harare, Zimbabwe
Posts: 34
Reputation:
Rep Power: 4
Solved Threads: 2
there is this code
and now want to pass the value in the variable $var1 and store it in another variable in index page
$var1='done'
header("Location: index.php?$var1");and now want to pass the value in the variable $var1 and store it in another variable in index page
•
•
•
•
there is this code
$var1='done' header("Location: index.php?$var1");
and now want to pass the value in the variable $var1 and store it in another variable in index page
Ok, to do that you will need to change your redirect url a little bit. Variables are passed with a name and a value, so you would send it like so:
header("Location: index.php?var1=$var1");$var1 = $_GET['var1'];
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- i want to post data with screen scrap page.. (ASP.NET)
- i want to send labelbox value with redirect page (ASP.NET)
- i want to send labelbox value with redirect page (VB.NET)
- How to redirect a page in JSP (JSP)
- transfer data from an asp .net page into a javasscript script (ASP.NET)
- login script using sessions (PHP)
- php mail form - need to redirect to new page (PHP)
- How Can I Pass A PHP Variable From One .php page to another (PHP)
Other Threads in the PHP Forum
- Previous Thread: Parse error, unexpected T_STRING, expecting T_CASE
- Next Thread: Upload----Phpbb3?



Linear Mode