6 Replies - 530 Views - Last Post: 28 February 2013 - 03:39 AM Rate Topic: -----

#1 ak4744710  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 128
  • Joined: 30-January 13

quick question about singing out display message

Posted 27 February 2013 - 07:09 PM

Hi I was wondering what I need to do to add a message you have logged out I have a working setup however I am not sure where to insert that text or how the sntax would be any help is much appreciated here is my log out code
<?php
session_start();
if (isset($_SESSION['name'])){
session_destroy();
session_start();
}
header("Location:includeindex.php");
exit;
?>

Is This A Good Question/Topic? 0
  • +

Replies To: quick question about singing out display message

#2 raghav.naganathan  Icon User is offline

  • Perfectly Squared ;)
  • member icon

Reputation: 408
  • View blog
  • Posts: 1,440
  • Joined: 14-September 12

Re: quick question about singing out display message

Posted 27 February 2013 - 08:54 PM

Well, you could use Javascript to 'alert' the user that he has logged out, or you might as well use an echo statement like this.
echo "You have now been logged out";

regards,
Raghav
Was This Post Helpful? 0
  • +
  • -

#3 ak4744710  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 128
  • Joined: 30-January 13

Re: quick question about singing out display message

Posted 28 February 2013 - 02:47 AM

the echo would be fine except no matter which line I place it in it does not print to the page when user sings out.
Was This Post Helpful? 0
  • +
  • -

#4 raghav.naganathan  Icon User is offline

  • Perfectly Squared ;)
  • member icon

Reputation: 408
  • View blog
  • Posts: 1,440
  • Joined: 14-September 12

Re: quick question about singing out display message

Posted 28 February 2013 - 03:12 AM

What about the alertbox...did it work?

regards,
Raghav
Was This Post Helpful? 0
  • +
  • -

#5 ak4744710  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 128
  • Joined: 30-January 13

Re: quick question about singing out display message

Posted 28 February 2013 - 03:24 AM

View Postraghav.naganathan, on 28 February 2013 - 05:12 AM, said:

What about the alertbox...did it work?

regards,
Raghav

I do not have a alert box any way you could show me how this is done kind of new to php and I am sure it shows lol
Was This Post Helpful? 0
  • +
  • -

#6 raghav.naganathan  Icon User is offline

  • Perfectly Squared ;)
  • member icon

Reputation: 408
  • View blog
  • Posts: 1,440
  • Joined: 14-September 12

Re: quick question about singing out display message

Posted 28 February 2013 - 03:33 AM

ok...alertbox is done using javascript...something like this.

function alertMe()
{
alert("Hello there! My name is alert-box");
}
<input type="button" value="Click me!" onclick="alertMe()">


What happens is...when you click on the button which says Click me!, you will get a box called alert box which will display

Hello there! My name is alert-box


regards,
Raghav
Was This Post Helpful? 0
  • +
  • -

#7 ak4744710  Icon User is offline

  • D.I.C Head

Reputation: 2
  • View blog
  • Posts: 128
  • Joined: 30-January 13

Re: quick question about singing out display message

Posted 28 February 2013 - 03:39 AM

thank you for clarifying I am going to try this right now
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1