spot the mistake??

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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! 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux