I am using php to display 2 folders contents in a dual pane form. Folder A and Folder B. I generate checkboxes next to each file, and want to use a submit button to change what folder the file appears in. i.e. Move File 4 into Folder A from File B by checking the box and hitting the Move to Folder A button. here is what I have so far.[PHP]<html>
<head>
</head>
<body>
<form id="file_mover" >
<TABLE BORDER=5 CELLPADDING=10 CELLSPACING=10 ALIGN="CENTER">
<TR>
<TD><?php
$dir = scandir('.');
$files = count( $dir );
for ( $i = 0; $i < $files; $i++ )
{
if ( is_file($dir[$i]) )
echo "<input type='checkbox' name='filename[]' value=$ip><a href=\"$dir[$i]\">$dir[$i]</a><br>";
}
?></TD>
<TD><?php
$dir = scandir('.');
$files = count( $dir );
$filename = array_shift(exp lode('?', basename('')));
for ( $i = 0; $i < $files; $i++ )
{
if ( is_file($dir[$i]) )
echo "<input type='checkbox' name='filename[]' value=$iu><a href=\"$dir[$i]\">$dir[$i]</a><br>";
}
?></TD>
</TR>
<TR ALIGN="CENTER">
<TD><input type="button" value="Move to Published" onclick="moveTo Published();"></TD>
<TD><input type="button" value="Move to Unpublished" onclick="moveTo Unpublished();" ></TD>
</TR>
</TABLE>
</form>
</body>
</html>
[/PHP]
I am getting a bit lost so any help would be great!
<head>
</head>
<body>
<form id="file_mover" >
<TABLE BORDER=5 CELLPADDING=10 CELLSPACING=10 ALIGN="CENTER">
<TR>
<TD><?php
$dir = scandir('.');
$files = count( $dir );
for ( $i = 0; $i < $files; $i++ )
{
if ( is_file($dir[$i]) )
echo "<input type='checkbox' name='filename[]' value=$ip><a href=\"$dir[$i]\">$dir[$i]</a><br>";
}
?></TD>
<TD><?php
$dir = scandir('.');
$files = count( $dir );
$filename = array_shift(exp lode('?', basename('')));
for ( $i = 0; $i < $files; $i++ )
{
if ( is_file($dir[$i]) )
echo "<input type='checkbox' name='filename[]' value=$iu><a href=\"$dir[$i]\">$dir[$i]</a><br>";
}
?></TD>
</TR>
<TR ALIGN="CENTER">
<TD><input type="button" value="Move to Published" onclick="moveTo Published();"></TD>
<TD><input type="button" value="Move to Unpublished" onclick="moveTo Unpublished();" ></TD>
</TR>
</TABLE>
</form>
</body>
</html>
[/PHP]
I am getting a bit lost so any help would be great!
Comment