How can we know that a session is started or not?

Answer Posted / binay kumar

if(session_id()=="") session_start();

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to create a session? How to set a value in session? How to remove data from a session?

512


Require_once(), require(), include(). What is difference between them?

531


Differences between get and post methods?

533


Explain how can we increase the execution time of a php script?

504


How to stop the execution of php script?

524






Why print_r is used in php?

535


Can we run php on tomcat server?

557


Tell me how can we determine whether a variable is set?

502


Is it possible to remove the html tags from data?

529


What percentage of websites use php?

502


What is trait in php?

546


Why do we use namespace in php?

459


What is meant by MIME?

630


What is in a cookie?

549


How is the comparison of objects done in php?

517