Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

php with message/alert box



5:52 am on Jul 14, 2004 (gmt 0)

10+ Year Member

in my php site, i have a form..after user fill up the information and click on submit button..i want a message box to be pop up "Information updated" with an OK button..after user click on the OK button, they will link to other page...can this be done with php? or other language? any idea? any example?


6:28 am on Jul 14, 2004 (gmt 0)

10+ Year Member

Easiest way would probably be in javascript, take a look at this:



8:19 am on Jul 14, 2004 (gmt 0)

10+ Year Member

Hi, yllai.

Here's how you do it from within PHP (but in reality this is javascript!)

Assuming that you have variable $success (TRUE on success) that holds whether the information was updated successfully.

if ($success) {
echo "<script>alert('Information updated')</script>";
echo "<script>navigate('other.php')</script>";
} else {
//....failed to update info

Will not work if your visitor's browser have javascript disabled.

- John Erazo


Featured Threads

Hot Threads This Week

Hot Threads This Month