View Single Post
  #1 (permalink)  
Old May 4th, 2009, 01:40 AM
sandeepgreaternoida sandeepgreaternoida is offline
Authorized User
Join Date: Dec 2007
Location: greaternoida, u.p, India.
Posts: 66
Thanks: 9
Thanked 2 Times in 2 Posts
Send a message via AIM to sandeepgreaternoida Send a message via MSN to sandeepgreaternoida Send a message via Yahoo to sandeepgreaternoida Send a message via Skype™ to sandeepgreaternoida
Arrow Begin.Php5,,Chap04, page no.158,,ex. dynamic.php

Begin.Php5,,Chap04, page no.158,,ex. dynamic.php >> this example is not working fine....sombody if already has gone through it pls. let me know...below..i am pasting the original downloaded codes.pls. let me know the errors.

if (isset($_POST['posted'])) {
echo "<form method='POST' action='dynamic.php'>";
for ($counter = 0; $counter < $_POST['number']; $counter ++)
$offset = $counter + 1;
echo "<br>Please enter the name of child number $offset<br>";
echo "<input name='child[]' type='text'>";
echo"<br>Press the button to move on<br>";
echo "<input type='submit' value='Next'>";
echo "<input type='hidden' name='posted01' value='true'></form>";

} else {

if (isset($_POST['posted01'])) {
echo "Your children's names are:";
$childs_name = $_POST['child'][$count];
$checkempty = $childs_name;
$count = $count + 1;
} while ($checkempty != "");
if ($count == 1) {
echo "Not applicable";

<form method="POST" action="dynamic.php">
<input type="hidden" name="posted" value="true">
How many children do you have?
<input name="number" type="text">
<input type="submit" value="Send Number">

sandeep gupta