|
Posted by Rik on 09/08/06 19:36
Frits van Leeuwen wrote:
> Hello,
>
> I start index.php. There I click at a link. Then I start a file. With
> starting that file, I start a line for setting a cookie. After it, I
> like to go back (without a click) to index.php.
> So the cookie is set. but then...
> Who can help me?
click.php
<?php
setcookie(//etc);
header('Location: http://www.example.com/index.php');
exit;
?>
Or alternatively in one file:
index.php
<?php
if(isset($_REQUEST['cookie'])){
setcookie(//etc);
}
//rest of index.php
?>
<a href="./index.php?cookie">Set a cookie</a>
or:
<form method="post" action="./index.php">
<input type="submit" name="cookie" value="Set a cookie">
</form>
Grtz,
--
Rik Wasmus
Navigation:
[Reply to this message]
|