|
Posted by Auddog on 02/07/07 20:49
OK, I see the errors of my way. I now get :
<input name="hours[20]" type="text" size="4" maxlength="4">
I cut and pasted you code into the top part of my page - here is the code:
<?php
if (isset($_POST['submitted'])) {
$hours = array();
foreach($_POST as $key => $value){
if(preg_match('/^[0-9]+-hours$/i',$key)){
$keyarray = explode('-',$key);
$hours[$keyarray[0]] = $value;
}
}
print_r($hours);
//if - else statement isset
} else {
?>
When I run this all I get is array ( ) - is there something else I'm
missing.
"Rik" <luiheidsgoeroe@hotmail.com> wrote in message
news:op.tnd93ac9qnv3q9@misant.kabel.utwente.nl...
Auddog <will_k@hotmail.com> wrote:
> Here is what my input looks like from my browser (view page source):
>
> <input name=hours['.3.'] type=text size=4 maxlength=4 >
>
> Is that the same? I'm sorry for being slow at getting this.
No, it is not. I gave you the code. Copy/paste it if need be.
--
Rik Wasmus
Navigation:
[Reply to this message]
|