You are here: Re: from index.php to file and back « All PHP « IT news, forums, messages
Re: from index.php to file and back

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация