How to create a session? How to set a value in session?
Answer / Sameer Ahmad
To create a PHP session, you need to start the session using the `session_start()` function. To set a value in a session, use the `$_SESSION[]` array:
```php
session_start();
$_SESSION['my_variable'] = 'some value';
```
| Is This Answer Correct ? | 0 Yes | 0 No |
What is the difference between $message and $$message in php?
Can i get free good material for preparation for Zend Certification can i get good questions about certification?
Any good PHP developer looking for change
Does empty check for null?
What is the Diff. Between echo() and Print() in PHP?
29 Answers CoreNet, Priya, QueenZend, Sky InfoTech, Syntel,
armstrong number by using php while number is given by the keyboard.?
What is php's mysqli extension?
What is the function to count elements in an array in PHP?
How to list all values of submitted fields?
How to remove leading and trailing spaces from user input values in php?
Why does php need server?
How to take a substring from a given string?