VectorLinux

Please login or register.

Login with username, password and session length
Advanced search  

News:

Visit our home page for VL info. For support and documentation, visit the Vector Linux Knowledge Center or search the Knowledge Center and this Forum using the search box above.

Author Topic: Cookie Question  (Read 1783 times)

Daniel

  • Packager
  • Vectorian
  • ****
  • Posts: 704
    • TuxToys - Packages for VectorLinux 6.0
Cookie Question
« on: June 06, 2009, 06:04:48 pm »

How do you set up cookies on a website such that you could set up a login screen so that only people who enter the correct password and receive a cookie can access other pages? And where are cookie files stored on your computer?
Logged
The following sentence is true. The previous sentence is false.

VL 6.0 SOHO KDE-Classic on 2.3 Ghz Dual-core AMD with 3 Gigs of RAM

stretchedthin

  • Administrator
  • Vectorian
  • *****
  • Posts: 3780
    • Opensourcebistro.com
Re: Cookie Question
« Reply #1 on: June 06, 2009, 09:55:14 pm »

I know this can be done with php.  There is a little something about it here.

http://www.tizag.com/phpT/phpcookies.php

You may also want to look at sessions.
http://www.tizag.com/phpT/phpsessions.php
Logged
Vectorlinux screencasts and  tutorials can be found at....
http://www.opensourcebistro.com/blog1
http://www.youtube.com/user/vid4ken?feature=mhee

Daniel

  • Packager
  • Vectorian
  • ****
  • Posts: 704
    • TuxToys - Packages for VectorLinux 6.0
Re: Cookie Question
« Reply #2 on: June 09, 2009, 06:32:23 pm »

I looked into php, made a .php file and uploaded it but the php scripts in the file/page don't seem to be working. Do I have to install php in the site first? How can I know if a site has php ability already?
Logged
The following sentence is true. The previous sentence is false.

VL 6.0 SOHO KDE-Classic on 2.3 Ghz Dual-core AMD with 3 Gigs of RAM

stretchedthin

  • Administrator
  • Vectorian
  • *****
  • Posts: 3780
    • Opensourcebistro.com
Re: Cookie Question
« Reply #3 on: June 10, 2009, 01:26:24 am »

PHP is a server side script, as I remember.  Once about 6 years ago I built a website with it and sold all my stuff via the web rather than a garage sale, when I was moving out of Seattle,WA.   Being a server side application you need to make sure your host supports php, as all the code is interpreted on their end.  I went down into the basement and dug up the book I used it was called "Build Your Own Database Driven Website Using PHP & MySQL"  The publishers referenced this website in the book http://www.sitepoint.com/. I also used SAMS Teach Yourself PHP 4.
That was sometime ago, but I do remember looking for a web host that already had PHP and MySQL installed for me. You should be able to verify with your host if they do, through the web site they advertise their services on.  If so then PHP and MySQL are hugely popular and you should be able to fine plenty of documentation at bookstores and libraries. ( You will only need MySQL if you are going to set up usernames and passwords for people who join your site.)
Sadly, I don't remember much after that. Moved back Canada and that Canadian beer is much too strong.
« Last Edit: June 10, 2009, 04:09:15 am by stretchedthin »
Logged
Vectorlinux screencasts and  tutorials can be found at....
http://www.opensourcebistro.com/blog1
http://www.youtube.com/user/vid4ken?feature=mhee