Mind blowing SEO improving and Google rank increasing Signature Rotator SEO Tool.

Thread: 

How to create php welcome message?

Ads
banner
banner
banner
badboy Offline referral

Posts: 106
Joined: May 2014
Reputation: 0

#1
Member
I don't want to use JavaScript neither jQuery to create a welcome message as most web-browser have JavaScript disabled and also it slows my website down increases load time.

I need to know how to show a message using PHP code?
marcus_avrelius Offline referral

Posts: 2,424
Joined: May 2013
Reputation: 102

#2
Support Team
The easiest way is to simply use PHP echo that will show a the message every time user opens a page! However that could be annoying for some so the solution is to use cookie or session to only show the message once per session.

PHP Code:
if(!isset($_SESSION['welcome'])
{
     
$_SESSION['welcome'] = 1;   
} else {
     if(isset(
$_SESSION['welcome'])) {
      echo 
"some text here";
      
session_write_close();
      exit();
     }

Rapidsoft technologies Offline referral

Posts: 209
Joined: Sep 2015
Reputation: 1

#3
Member
You may find several tutorials which provide code for development.





User(s) browsing this thread: 1 Guest(s)