Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.