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/12/06 10:49

Frits van Leeuwen wrote:
>>> 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...
>> 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>
> Thanks Rik,
> Can you explane the last example?
>

In the last example, the index.php itself will set a cookie if the GET or
POST array contains the named variable 'cookie'. No oher/intermediate files
required.

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

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