adspace


Which is the correct way to check if a session has already been started ?

Answer Posted / Siddharth Chaudhary

"You can check if a session has already been started in PHP by using session_id() function. If session_id() returns a value, it means the session has already been started. Otherwise, you need to start it with session_start()."

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is trait in php?

1065


if you run the app program all vendor open items are cleared but is it possible to reverse the again again open items please tell me the answer

1987


Name and explain five of the PHP error constants?

1033


How to create a web form?

1109


Which variable declarations within a class is invalid in php?

1046


List some features of php that are deprecated in php7?

1021


What is difference between static and final in php?

1107


Explain me is it possible to destroy a cookie?

1025


What is the current stable version of php? What advance thing in php7?

1094


How can we extract string "pcds.co.in" from a string "https://info@pcds.co.in" using regular expression of php? More on reg can you explain

1077


What is the difference between htmlentities() and htmlspecialchars()?

1089


What does $_files means?

1162


Tell me what kind of things have you done on the social side?

1063


How to calculate the difference between two dates using php?

1142


how to detect a mobile device using php

1172