0

i keep getting a error on the next page saying that hotel1 is an undefined index:
page 1:

    foreach($child->children() as $gchild)
    {

        //echo ">> " . $gchild->getName() . ": " . $gchild . "<br>";

        echo "<tr><td><input type='radio' name='my' value='my" . $gchild->name . "'></td>";
        echo "<td><input type='checkbox' name='hotel". $r."' value='" . $gchild->hotelId . "'>" . $gchild->name . "</td></tr>";
        $r++;
    }   

page 2:

if(isset($_POST["hotel1"]))
{ 
    $hotel1= $_POST["hotel1"]; 
}
if(isset($_POST["hotel2"]))
{ 
    $hotel2= $_POST["hotel2"]; 
}

can someone tell me what i am missing or if im doing this wrong?

2
Contributors
1
Reply
20
Views
3 Years
Discussion Span
Last Post by pritaeas
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.