Reply to spot the mistake??

Your name:

Reply:


Posted by AndreaD on 10/02/02 11:11

this is the form

form name="form1" method="post" action="<? $PHP_SELF; ?>">
<table width="515" border="1">
<tr>
<td width="87"><div align="center">
<input name="cookie[andrea]" type="text" class="text_field"
id="cookie[andrea]" value="" size="1" maxlength="1" >
<input name="cookie[john]" type="text" class="text_field"
id="cookie[andrea]" value="" size="1" maxlength="1" >
</div></td>

this is the php

<?php

if (isset($submitted)){

foreach($_POST['cookie'] as $name => $age)
{
setcookie("cookie[$name]", $age);
}
foreach($_POST['cookie'] as $name => $age)
{
echo $_COOKIE[$name];
}
}
?>


just want to set the cookies and display them!

[Back to original 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

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