InterviewSolution
| 1. |
What are the difference between session and cookies in PHP? |
|
Answer» Session and Cookies both functions are used to store information. But the main difference between a session and a cookie is that in case of session data is stored on the server but cookies stored data on the browsers. Sessions are more SECURE than cookies because session stored information on SERVERS. We can also turn off Cookies from the browser. EXAMPLEsession_start(); setcookie(name, value, expire, path,domain, secure, httponly); |
|