Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

width only applied to first row 1

Status
Not open for further replies.

Sardamil

Programmer
Apr 14, 2001
77
NL
I set the width of the cells in my table to a fixed width. For some reason it's only applied to the first row and not to the next rows. Can anybody tell me why that is?

// de table beginnen
echo '
<A HREF = logout.php>Log out</A>
<table>
<tr>
<td width="130">Datum</td>
<td width="180">Thuis</td>
<td width="180">Uit</td>
<td width="300">Aanwezig</td>';

//rij maken zodat je gegevens kan gebruiken
while($rij = mysql_fetch_assoc($uitvoeren1)){
//Echo(laat zien simpel form)
array_map('htmlspecialchars', $rij);
echo '
<form action="aanwezig.php" method="POST">
</tr>
<tr>
<td width="130">'.$rij['datum'].'</td>
<td width="180">'.$rij['thuis'].'</td>
<td width="180">'.$rij['uit'].'</td>
<td width="300"><input type="radio" name="aanwezig" value="aanwezig" />Aanwezig
<input type="radio" name="aanwezig" value="afwezig"/>Afwezig
<input type="submit" name="submit" value="Verstuur" /></td>';

// en tenslotte de boel afsluiten
echo '
</tr>
</table>;
</form>';
}

Murphy's Law said:
Anything that can go wrong will go wrong

Window to my world
 
why? because you have not debugged your html code.

Code:
   echo    '
<A HREF = logout.php>Log out</A>
            <table>
                <tr>
                    <td width="130">Datum</td>
                    <td width="180">Thuis</td>
                    <td width="180">Uit</td>
                    <td width="300">Aanwezig</td>
                </tr>';

//rij maken zodat je gegevens kan gebruiken
while($rij = mysql_fetch_assoc($uitvoeren1)){
    //Echo(laat zien simpel form)
    array_map('htmlspecialchars', $rij);
    echo '
<form action="aanwezig.php" method="POST">
                <tr>
                    <td width="130">'.$rij['datum'].'</td>
                    <td width="180">'.$rij['thuis'].'</td>
                    <td width="180">'.$rij['uit'].'</td>
                    <td width="300"><input type="radio" name="aanwezig" value="aanwezig" />Aanwezig
                            <input type="radio" name="aanwezig" value="afwezig"/>Afwezig
                            <input type="submit" name="submit" value="Verstuur" /></td></tr></form>';
}
// en tenslotte de boel afsluiten
echo        '</table>';
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top