<script language="JavaScript">
<!--
function restore(what){
   if (confirm("Are you sure you want to overwrite the database with the file " + what + "?")) {
         window.location = "backups.php?action=restore&file=" + what;
   }
}

function delete(what){
   if (confirm("Are you sure you want to overwrite the database with the file " + what + "?")) {
         window.location = "backups.php?action=restore&file=" + what;
   }
}
//-->
</script>

I am calling the functions with a link: <a href="Javascript:delete('filename')">Delete</a> Why doesn't this work?

Try poofreading it. It seems that both do the same thing.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.