php没有关闭
form前头把PHP关上.

解决方案 »

  1.   

    <form name="form" method="post" action="test.php"> 
    <input name="ws" type="text" size="20" value=" <?php if(isset($_POST['ws'])) echo $_POST['ws'];?>" /> 
    <input name="submit" type="submit" value="yes" /> 
    <?php 
    if(@$_POST['ws'] != 0){ 
    for($i = 0;$i < $_POST['ws'];$i++){ 
    echo '元素['.($i+1).']'; 
    echo "&nbsp;&nbsp;&nbsp;&nbsp;"; 
    echo ' <input name="Elements[$i]" type="text" size="40" maxlength="60" value="'; 
    if(isset($_POST['Elements[$i]'])){ 
    echo $_POST['Elements[$i]']; 
    }else{ 
    echo $i; 

    echo '" />'; 
    echo "&nbsp;&nbsp;&nbsp;&nbsp;"; 
    echo ' <input name="submit[]" type="submit" value="确认" />'; 
    echo " <br /> <br />"; 


    ?>
    </form>忘打了 php已经关闭了