Re: determine number of entries Options (2)
- From: question.boy@xxxxxxxxxxx
- Date: Thu, 31 Jan 2008 07:08:35 -0800 (PST)
I've tried implementing your comments but can't make it work. Below
is all of my code (testing) could you point out my mistake because it
is still spitting out a "Warning: Invalid argument supplied for
foreach()" error message.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1" />
<title>Untitled Document</title>
</head>
<body>
<?php
foreach($_SERVER['POST']['IngQty'] as $key => $value) {
echo $key." : ".$value."<br/>";
}
echo "Count: ".count($_SERVER['POST']['IngQty'])."<br/><hr>" ;
?>
<form id="form1" name="form1" method="post" action="">
<p>
<input type="text" name="IngQty[0]"><br>
<input type="text" name="IngQty[1]"><br>
<input type="text" name="IngQty[2]">
</p>
<p>
<input type="submit" name="Submit" value="Submit" />
</p>
</form>
</body>
</html>
Thank you for all your help! Is there a good tutorial you could
recommend or subject name that I should lookup that covers this (I
don't even know what I am trying to do is called).
QB
.
- Follow-Ups:
- Re: determine number of entries Options (2)
- From: ZeldorBlat
- Re: determine number of entries Options (2)
- References:
- determine number of entries Options (2)
- From: question . boy
- Re: determine number of entries Options (2)
- From: ZeldorBlat
- determine number of entries Options (2)
- Prev by Date: Strtotime returns 02/09/2008 for "next Saturday"....
- Next by Date: Re: [PHP] first php 5 class
- Previous by thread: Re: determine number of entries Options (2)
- Next by thread: Re: determine number of entries Options (2)
- Index(es):
Relevant Pages
|