View Single Post
  #2 (permalink)  
Old 07-18-05, 06:34 PM
the_mole001's Avatar
the_mole001 the_mole001 is offline
Newbie Coder
 
Join Date: Feb 2004
Location: Australia
Posts: 96
Thanks: 0
Thanked 0 Times in 0 Posts
Perhaps your code should look a little bit more like:

PHP Code:

<?php 

    
if(isset($_GET['submit'])) { 
        for(
$i=1$i<=7$i++) { 
            
$dato $_POST["dato"]; 
            
$v1 $dato[$i][0]; 
            
$v2 $dato[$i][1]; 
            echo(
"<p>".$i." Verdi 1: ".$v1.""); 
            echo(
"Verdi 2: ".$v2."</p>"); 
        } 
    } 
    else{ 
        echo(
'<form action="t1.php?test=test" enctype="text/plain" method="post">'); 
        for(
$i=1$i<=7$i++) { 
            echo 
''.$i.' <input type="text" name="dato[$i][]" value="test'.$i.'"/>'
            echo 
'<input type="text" name="dato[$i][]" value="test'.$i.'"/>'
            echo 
'<br />'
        } 
        echo(
'<input type="submit" value="test" name='submit'> 
        </form>'
); 
    } 
?>
I just changed the method it uses for checking if the person has filled in the form yet or not, hope it helps.
__________________
Current Project: GGAC Website
Project Link: http://peter.5gigs.com/
Reply With Quote