How do I start a php session?



How do I start a php session?..

Answer / Rajiv Singh Chaudhary

To start a PHP session, use the `session_start()` function at the beginning of your script. Make sure to call this function before any output is sent to the browser. Here's an example:nn```phpn<?phpn session_start();n// Your code here...n```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

How to upload and play video in Php when u r in localhost?

3 Answers   HCL,


What is meant by MIME?

1 Answers  


Hi all, I have a problem in Apache on windows xp.I tried to unistall apache and install it again. But when in did the installation again, and tried to run apache, i get the following error message, Socketaddresse can just be used once. Make_sock: could not build to address 0.0.0.0.80 No listening sockets available.Shutting down Unable to open logs. and i also get (error) OS2. The system cannot fine the installed service named "Apache2". Please i need some one to help me out with this.I'm really fustrated cuz i need this stuff working as fast as possible. PLEASE HELP ME

2 Answers  


What is cookie and session in php?

1 Answers  


what is hidden variable? what is its difference with the normal variable...

2 Answers   Shine,


How data or variable can be receive or send from PHP to HTML page??

3 Answers   TCS,


Is python better than php?

1 Answers  


Why is node js better than php?

1 Answers  


Is php a case sensitive language?

1 Answers  


What are the popular frameworks in php?

1 Answers  


What is difference between action hook and filter hook?

1 Answers  


What does a dependant variable mean?

1 Answers  


Categories