Jump to content

notification script


Destramic

Recommended Posts

hey guys im interested in the jquery notification scripts...where a user registers and then gets redirected to homepage where a notification pops up saying "thank you for registering".

 

now ive looked at a few examples online but im clueless to how each individiual notification pops up is it activated by the refering url?

 

would be good to know...but thats the only way to me that makes sense on how it works.

 

thank you

Link to comment
https://forums.phpfreaks.com/topic/293118-notification-script/
Share on other sites

You could store a message in session before redirecting, and then on the page you're redirecting to check to see if that session variable exists (your thank you message) and if it does, display it.

 

You could also do something like adding a GET parameter to the url of the page you're redirecting to, and then checking for that variable on the page and display a message the same way.

 

JS: 

window.location.href="http://yoursite.com/?message=thank-you";

PHP on page getting redirected TO:

if (isset($_GET['message']) AND $_GET['message'] == 'thank-you')
{
  echo 'Thank you for creating your account';
}

Personally I'd use sessions.

Link to comment
https://forums.phpfreaks.com/topic/293118-notification-script/#findComment-1499915
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.