简体   繁体   中英

form submit not working in firefox , works fine in chrome

I am fetching data from database , each rowof data creates a form , each row has a "book" button, which submits phase and site data, but this "book" button does not work in Firefox and IE , it works in chrome

<?php
echo"<div style='overflow-y:scroll;height:200px;float:left;' ><table border=1 >
    <tr>
    <td>phase</td> <td>site no.</td> <td>plot-size</td> <td>face</td> <td>sply</td> <td>status</td><td>select </td>
    </tr>" ;
    while($row = mysql_fetch_array($ret, MYSQL_ASSOC))
    {
        echo "<tr>".
            "<form action='restricted.php' method='get'>".
            "<td><input type='text' value=\"{$row['phase']}\" name='phase' size='3' readonly />  </td>".
             "<td><input type='text' value=\"{$row['id']}\" name='site' size='4' readonly /></td>".
             "<td> {$row['size']} </td>".
             "<td> {$row['facing']} </td>".
             "<td>{$row['sply']} </td> ".
             "<td>{$row['status']} </td> ".
             "<td><input type='submit' name='book' value='book' \" /></td>".
             "</form>".
             "</tr>";   

    } 
    echo "</table></div>";
?>

you cannot have a form within a <tr> element. You must either put the form outside the table, or inside a <td> element. Firefox is probably complaining about that.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM