Getting a table columns contents in line, with forms
Posted: Fri Dec 09, 2005 7:32 am
Hi again,
More client side trouble.
Ok, so as you can tell, I've got one column spanning my whole row (4 columns). I've got the files and directories count displaying fine, but then the form for making a new dir goes onto a new line below it. I presume this is because <form> auto inserts a line break or something, and it's the same in IE and FF.
How can I get that stuff in the same column/row onto the same line in my page?
While I'm at it, I've got 2 minor sort of related questions aswell:
Instead of hard coding it to colspan 4 columns, can I just make it colspan all columns? I've tried * to no avail.
My other one is, instead of putting in the form action URL . index.php?dir= . $_GET['dir'], or even more effectively, URL . index.php . if (isset($_GET['dir'])) echo "?dir=", $_GET['dir']; is there a way to just dump the current absolute URL into the form action? I haven't found a function that keeps all the GET info intact.
TIA.
More client side trouble.
Code: Select all
echo '<tr bgcolor="';
//Alternate the row bg colours
$i++;
if ($i % 2 == 0) {
echo '#F0F0F0';
} elseif ($i % 2 == 1) {
echo '#FFFFFF';
}
echo '"><td colspan="4"><font size="-1" align="left">Directories: ' . $dircount . ' | Files: ' . $filecount , '</font>';
//Show the new dir form/input
echo '<font size="-1"><form action="index.php?dir=' . $_GET['dir'] . '" method="post">';
echo 'New Directory: <input type="text" size="20" maxlength="30" name="dirname"> ';
echo '<input type="submit" name="makedir" value="Create"></form></font></td></tr>';How can I get that stuff in the same column/row onto the same line in my page?
While I'm at it, I've got 2 minor sort of related questions aswell:
Instead of hard coding it to colspan 4 columns, can I just make it colspan all columns? I've tried * to no avail.
My other one is, instead of putting in the form action URL . index.php?dir= . $_GET['dir'], or even more effectively, URL . index.php . if (isset($_GET['dir'])) echo "?dir=", $_GET['dir']; is there a way to just dump the current absolute URL into the form action? I haven't found a function that keeps all the GET info intact.
TIA.