homepage Welcome to WebmasterWorld Guest from 204.236.254.124
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
php with message/alert box
yllai




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

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?

 

rlkanter




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

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

[web-wise-wizard.com...]

johnerazo




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

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>";
exit();
} else {
//....failed to update info
}

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

- John Erazo

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved