# 3 Questions about Session and Cookies usage with PHP

**URL:** <https://forum.kirupa.com/t/3-questions-about-session-and-cookies-usage-with-php/84018>\
**Category:** programming\
**Created:** [March 23, 2005, 11:56pm UTC](https://forum.kirupa.com/t/3-questions-about-session-and-cookies-usage-with-php/84018 "2005-03-23T23:56:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![FlashNewby](https://avatars.discourse-cdn.com/v4/letter/f/5f8ce5/32.png) [@FlashNewby](https://forum.kirupa.com/u/FlashNewby)\
**Post date:** [March 23, 2005, 11:56pm UTC](https://forum.kirupa.com/t/3-questions-about-session-and-cookies-usage-with-php/84018/1 "2005-03-23T23:56:39Z")

</div>

**Q1**  
Since sessions in PHP rely on cookies being enabled on the users computer, what happens if the user decides not to use cookies, how could I still maintain the session or how can use sessions in php without using cookies?

**Q2**  
In my php file how would I be able to detect if a user has cookies enabled?  
I have a php page that has a simple message saying “Please enable cookies”. I want to redirect to this page if the user has cookies disabled?

**Q3**  
Can someone tell me if it is possible to set and access a cookie in the same page like you can do with sessions?

Thanks
