Question about The PHP Group PHP

1 Answer

Clarification thanx for replying .can you suggest me how to use n implement cookies for logout script.i was trying it like --on logout ,i was destroying session variables by deleting data in variables (like username and password),then explorer should not direct to user profile.plz help me.

Posted by on

1 Answer

  • Level 1:

    An expert who has achieved level 1.

  • Contributor
  • 4 Answers

Are you saying you're switching from a session variable to a cookie?

delete the cookie altogether by setting the expiration to a time in the past (negative value). don't forget that you'll then have to reload a page in order to reread the cookie data.

so if you have a cookie with a logged_in value = true, and you set it to logged_in value = false, you're still logged_in = true, until you reload that page (or another page) and it rereads the cookie data and now determines that logged_in = false.

make sense? write the logged_in=false to the cookie, then force a url redirection to reload the page is my suggestion.

Posted on Apr 04, 2009

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

When I try to watch YouTube videos, it starts, stops, starts, stops etc.; The Help section suggests I install the latest version of Flash Player and enable Java Script... but I don't know how to... Can you...


Goto http://get.adobe.com/flashplayer/ follow the prompts and install flash.

In your browser e.g IE or Firefox, find the settings page that turns on javascript.

May 31, 2010 | Adobe Compilers & Programming Tools

2 Answers

I need to install javascript


Javascript is used in the form of client-side scripting implementated as a part of webbrowser. No need to install any specific software. You just have to enable certain settings in internet explorer for it to work properly

Follow the link for more information

http://www.ehow.com/how_4886248_install-java-script-internet-explorer.html

Hope this helps

May 20, 2010 | Compilers & Programming Tools

1 Answer

Logout problem


Hey,
what code are you using to destroy the session?

should look something like this
e.g. getting rid of email session
<?php
unset($_SESSION['email']);
?>

Jan 16, 2009 | The PHP Group PHP

2 Answers

Logout script with session management in php5


just create a logout.php script with the following

<?php
session_start();
session_destroy();

header("Location: index.php");
?>

Have your logout button/link/whatever just open that page which connects to the session with session_start. Session destroy does exactly what it sounds like... it unsets all session data and tells the server to end the session. The header request then just re-directs the user to whatever page you want after (just change out index.php)

Dec 30, 2008 | The PHP Group PHP

1 Answer

I want to see software script...


It depends on the programming language.
What language is used?

Most programming languaes has an option to turn on debugging, which means for example the software writes down all the variables which it use.
(for example bash scripts use -x option, if you runs the bash script with -x it writes all options to the screen)

Nov 24, 2008 | Compilers & Programming Tools

1 Answer

Php cookie problems


can u give me the error that is shown when you try to use cookies ? or it just doesn't work ?

Sep 08, 2008 | The PHP Group PHP

1 Answer

EMIAL FOR COFFEECUP FORM BUILDER WITH PHP


listen problem is realeted to hosting
really go to this website
you can buy one great private email of your own
http://www.jdoqocy.com/click-3245371-10368018

Aug 28, 2008 | The PHP Group PHP

2 Answers

Help me to insert a java script


what is javascript of a button ceating in flash

Mar 29, 2008 | ArcMedia JavaScript Source Code 3000 Pro...

1 Answer

Data mining


Hello, you can find the best open-source implementation of data-mining algorithms here:
http://www.cs.waikato.ac.nz/ml/weka/

You can use the built-in application or embed it in your own code.
Of course it implements several naive bayes algorithms

Mar 20, 2008 | Compilers & Programming Tools

Not finding what you are looking for?
The PHP Group PHP Logo

Related Topics:

142 people viewed this question

Ask a Question

Usually answered in minutes!

Top The PHP Group Compilers & Programming Tools Experts

Robin Hill
Robin Hill

Level 3 Expert

1251 Answers

Mike

Level 3 Expert

4331 Answers

Mishan Kasiparsad

Level 2 Expert

142 Answers

Are you a The PHP Group Compiler and Programming Tool Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...