PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I am having issues with using the $_SESSION[...] as it is timing out. My app would work if I could do something like the following:
<?php
// This value may come from a database, or a $_REQUEST variable already
$itemVal = "Value Alpha";
// Set a link to call the new page with the $_REQUEST variable set for ?item
echo "<a href='newPage.php?item=".$itemVal."'>Go to new page</a>";
?>
However, this does not seem to work as the ?item value is not showing up on the newPage.php being called.
What is the proper way to set a request variable for the target page?
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
<?php
// This value may come from a database, or a $_REQUEST variable already
$itemVal = "Value Alpha";
// Set a link to call the new page with the $_REQUEST variable set for ?item
echo "<a href='newPage.php?item=".$itemVal."'>Go to new page</a>";
?>
However, this does not seem to work as the ?item value is not showing up on the newPage.php being called.
What is the proper way to set a request variable for the target page?
<?php
// This value may come from a database, or a $_REQUEST variable already
$itemVal = urlencode("Value Alpha");
// Set a link to call the new page with the $_REQUEST variable set for ?item
echo "<a href='newPage.php?item=".$itemVal."'>Go to new page</a>";
?>