Originally posted by BIOSTALL
I think it's refreshing itself because you havent put an 'action' in the forms attributes :bemused: Not sure though
BIOSTALL
thanks, but I don't think it's because of the 'action', it's still refreshes, even though there is an action to a php file..
<?
if(isset($_POST['def']))
{
echo "Are you sure you want to set this as your default picture?";
echo '<br><div align="center">';
echo "| Yes | No | buttons comes here";
echo '</div>';
}else{
echo '<form name="def" method="post" action="index.php">
<img src="images/ar1.jpg">Set this picture as : <input name="def" type="image" id="def" src="images/def.jpg" align="middle" border="0">
</form><br>';
}
?>
If this way won't work it's better to tell what I'm up to, I'm trying to move a file from one folder to another with the user's conformation, when the default button is clicked it's should ask are you sure... then if the answer is yes only move the file else do nothing...