-2

here is my function:

function alert($msg)
{
    echo "<script>alert('$msg');history.back();</script>";
}

and this is how i call the function:

if (statement is true)
{
  Update the query!
}
}else{ alert("Please enter numeric in age");echo formupdateadd2 ();}
deceze
  • 510,633
  • 85
  • 743
  • 889
  • 1
    My best guess is that you need to read this: [What is the difference between client-side and server-side programming?](http://stackoverflow.com/q/13840429/476) Though it's hard to tell. – deceze Feb 20 '15 at 02:00

1 Answers1

1

Would you say a "confirm" alert box ? This is like an alert box but with 2 buttons yes/no and a way to get the result as is:

if (confirm("do you want it ?")) 
{
    // if they clicked yes
}
else
{
    // if they clicked no
}
JBA
  • 2,889
  • 1
  • 21
  • 38