I think the index page should have a clickable link to see the directory of the forms you've created. I also think there needs to be a delete confirmation; I added one with JavaScript. I changed this section:
include("copyfunc.php");
$dir_list = ls_a("use/");
if(sizeof($dir_list)>0)
{
if($dir_list[0]!= "")
{
echo "You have created the following forms:<ul>";
for($i=0;$i<sizeof($dir_list);$i++)
echo "<li><a href=\"/form/use/$dir_list[$i]\">".$dir_list[$i]."</a> ... <a href='del_form.php?id=".($i+1)."' onClick=\"return confirmSubmit();\">delete?</a>";
echo "</ul>";
echo "<br>Continue with creating a new form:";
}
}
I also added this in the head tag
<script language="JavaScript">
function confirmSubmit()
{
var agree=confirm("Are you sure you want to delete this item?");
if (agree)
return true ;
else
return false ;
}
</script>
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think the index page should have a clickable link to see the directory of the forms you've created. I also think there needs to be a delete confirmation; I added one with JavaScript. I changed this section:
include("copyfunc.php");
$dir_list = ls_a("use/");
if(sizeof($dir_list)>0)
{
if($dir_list[0]!= "")
{
echo "You have created the following forms:<ul>";
for($i=0;$i<sizeof($dir_list);$i++)
echo "<li><a href=\"/form/use/$dir_list[$i]\">".$dir_list[$i]."</a> ... <a href='del_form.php?id=".($i+1)."' onClick=\"return confirmSubmit();\">delete?</a>";
echo "</ul>";
echo "<br>Continue with creating a new form:";
}
}
I also added this in the head tag
<script language="JavaScript">
function confirmSubmit()
{
var agree=confirm("Are you sure you want to delete this item?");
if (agree)
return true ;
else
return false ;
}
</script>