Hi there
I think it’s a stupid question, but I can’t find the solution for this thing I would do
I created a page, that here I call it “sl.php”:
<?php
echo "<a href=\"www.domain.com/index.php?name=test\">Click here!</a>";
?>
Clicking on that link, it report to the “index.php” page where I wrote this code:
<?php
echo "My name is " . $_REQUEST['name'] . "<br />";
?>
Now there is my problem. I want that the word requested by using $_REQUEST[‘name’] (in this case it’s “test”) will be available also in other pages, such as “faq.php”. So I put, always in the “index.php” page, that code, but I think it’s wrong:
<?
session_start();
echo "My name is " . $_REQUEST['name'] . "<br />";
setcookie('name', 'name', time()+60*60);
$_REQUEST['name'] = $_COOKIE['name'];
?>
… and in the “faq.php” page:
<?php echo "Hello " . $_COOKIE['name'] . "!!!<br />"; ?>
What I wrong? I’m sorry, I’m a newbie with php. Please be patience ;D
Thank you very much in advance for your help.
Andrea