Hi guys
I need to get the service[] array within the foreach.
I get this error
Warning: Invalid argument supplied for foreach() in timessetup.php on line 1043
How can I fix this
PHP Code:
foreach($_POST['date'] as $row=>$Act)
{
$starttimehour=mysql_real_escape_string($_POST['starttime1'][$row]);
$starttimeminute=mysql_real_escape_string($_POST['starttime2'][$row]);
$services=mysql_real_escape_string($_POST['service'][$row]);
echo"$services";
foreach($services as $s=>$Acts)
{
$sservices=mysql_real_escape_string($_POST['service'][$s]);
echo"$sservices";
}
Smarty page that sends the info
PHP Code:{foreach from=$times_array item=module key=key}
<tr>
<td>
{foreach from=$service_data item=servicesitem key=key}
<input type=checkbox name=service[] CHECKED value="{$servicesitem.Services_ID}"> <a href=editservice.php?id={$servicesitem.Services_ID} target=new>{$servicesitem.Name}</a><br />
{/foreach}
</td>
<td><input type=hidden name=date[] value="{$module|date_format:"%H:%M:%S"}"><input type=checkbox name=delete></td>
</tr>
{/foreach}







Bookmarks