Question about The PHP Group PHP

1 Answer

Logout problem i m not be able to logout with destroing session

Posted by on

1 Answer

  • Level 1:

    An expert who has achieved level 1.

  • Contributor
  • 3 Answers

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']);
?>

Posted on Feb 06, 2009

Add Your Answer

Uploading: 0%

my-video-file.mp4

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

×

Loading...
Loading...

Related Questions:

1 Answer

How do i program my embroidery machine hoop to cover larger design


Hi! We got disconnected with our chat session.
Anyway.. What you could do is first load the design. After that click on edit then auto-split. You then set the maximum size that your machine will allow. 110x100 mm for example. click on ok. After thatyou then click on file then save separated as. That is what you use to transfer using the USB.

I hoe this helps.

Jubert

May 19, 2010 | The Learning Company Compilers &...

1 Answer

Sir , we are run cystal reports in vb.net , but that time we are use any control menu like print option ,zoom option ,nextpage option etc. so that problem is control post back and blank my my reports


you have to rebind the report on every postback.

in form_load put

if (Page.IsPostBack)
{
if (Session["currentReport"] != null)
{
CrystalReportViewer1.ReportSource = Session["currentReport"];
CrystalReportViewer1.DataBind();
}
}

and when creating your report add this line
Session["currentReport"] = myReport;

Apr 16, 2009 | Compilers & Programming Tools

1 Answer

Retrieving and displaying logged in users info


you had not provided complete detail that if you are having database for username or you want to fetch username from 'email providing site' in which your user created his account.if you are trying for second option,It is almost not possible coz any of the email providing site will not exchange personal detail of any of his acc holder.
if you are trying first option,session in php can help you.you can store username in a session variable n then u can access them on any page if session is not destroyed or expired.

Mar 22, 2009 | The PHP Group PHP

1 Answer

Php assigning value to variables and posting result, how can i assign a value to variable that will add the score evertytime the answer in my trivia page is correct, how can i make a formula for total...


You can use a session variable.
First use session_start().
Then you can crate a session variable by simply setting the appropriate member of the $_SESSION or $HTTP_SESSION_VARS (PHP < 4.1.0) array
Example.

session_start();

$_SESSION["number"] = 10 ;

echo $_SESSION["number"];

You can call it whenerver you want.
remmember to start session on all the pages where you use the variable.

Mar 17, 2009 | The PHP Group PHP

1 Answer

Clarification


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.

Jan 13, 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

PHP Troubleshoot


Is your "C:\PHP\Sessions" directory writeable by your IIS user account?

is Use_Session_cookies enabled?

Aug 05, 2008 | The PHP Group PHP

2 Answers

PHP problem


could you give me more info plz

Jul 30, 2008 | The PHP Group PHP

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

Related Topics:

93 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...