It seems that you didn't get what I meen. I want the user to click a hyperlink not a submit button, then a prompt box appears waiting the user to enter the code in it, and when he do that he is taken to (delete.php?code=number) where (number) is the number he entered in the prompt box.
Any way I have found a good and simple way to do that with the following code:
Code:
<script>
function get_code(form_name)
{
var number = prompt("Enter code","");
if (number != null && number != '')
{
document.forms[form_name].code.value = number;
document.forms[form_name].submit();
}
}
</script>
Code:
<FORM name="delete_product_code" METHOD="GET" ACTION="delete.php">
<INPUT name="code" value="" TYPE="hidden">
</FORM>
Code:
<a href="#" onClick="get_code('delete_product_code');">Delete Product</a>