DBGTN.com Version 8.0
Members Login:
Username:
Password:
[ Forgot Password? - Register ]
Latest Additions:
 - 12.10.02 - Akira Toriyama
 - 12.09.02 - Animation Cels
 - 11.05.02 - DBGTN Store
 - 10.25.02 - Screen Caps.
 - 10.21.02 - New Layout
Site Features:
 - DBGTN Anime Search!
 - DBGTN Membership
 - DBGTN Mini Board
 - DBGTN Store
 - DBGTN Top 100
 37 Users online
 Total Members
 Registered: 2569
 Members Online: 9
 Member Stats
 Your User ID#:
 209.237.238.160

 · Navigation Menu
 - Current News
 - General Info.
 - Dragon Ball
 - Dragon Ball Z
 - Dragon Ball GT
 - Multimedia
 - Interaction
 - Fan Files
 - Humor
 - Webmasters
 - The Community

 · The U.S. of A.




 · Topsites

Join Now!
------------
Click Here to Visit!


 · AniB. Newsletter

Email Address:

Subscribe
Unsubscribe




Saiyan Extension

 · DBGT NETWORK

• Tutorials: PHP: Creating a cookie

PHP is short for Post Hypertext Peripheral Coding. It's a great programming language that lets you do many things never thought possible. You can change your layout without having to edit every single page of your site. It's not complicated to learn if you're familiar to SSI and it's very handy. Before you convert anything to PHP make sure your host supports PHP or else it won't work. Free web hosts such as: FreeWebsites.com, Geocities, Angelfire, etc. do not support PHP!

The code below creates a cookie on the visitor's browser.

<?php
$value = "something here";
setcookie("cookiename",$value,time()+3600,"/",".domain.com");
// PHP 3
echo $cookiename;
// PHP 4.1.0
echo $_COOKIE["cookiename"];
?>

1st step: Change "something here" to any value you want stored, change "cookiename" to the name you want to call the cookie, and finally change domain.com to your own domain.

2nd step: The "time()+3600" portion of the code tells it when to expire, on the coding above I set it to expire one hour from now(3600 seconds = 1 hour). You can change that value depeding on when you want it to expire(example: For 24 hours you would have to change it to "time()+(3600*24)" ).

3rd step(optional): To delete a cookie that you have created you will have to paste the same coding above but you need to set the expiration time to "time() - 3600", meaning 1 hour ago.

NOTE: Cookies will not become visible until the next loading of a page that the cookie should be visible for. To test if a cookie was successfully set, check for the cookie on a next loading page before the cookie expires. Expire time is set via the expire parameter.
Cookies must be deleted with the same parameters as they were set with.








 · View Layout..?

 · Voting Poll
Internet connection type?
14K
28K
56K
DSL/Cable/LAN
T1-T3


 · Product Spotlight


Dragon Ball Z:Kid Buu - Saiyan Pride DVD
Price: $18.71
[ - BUY NOW! - ]
Browse Catalog

 · DBGTN Friends
 - DB Menace
 - DB-Unlimited
 - DBZ Circuit
 - DBZGT Legacy
 - DBZ Network
 - KN Vegeta
 - SaiyanChronicles
 - Saiyanz Power
 - Saiyanz Rage
 - The Cell Game


[ Home - Staff Login - FAQs - Link Us - Contact - Privacy Policy - Terms of Use - Copyright - Viewing - Statistics ]

Dragon Ball, Dragon Ball Z, and Dragon Ball GT © 2002 BIRD STUDIO/ SHUEISHA, TOEI ANIMATION. Licensed by FUNimation® Productions, Ltd. All Rights Reserved. Dragon Ball, Dragon Ball Z, and Dragon Ball GT and all logos, character names and distinctive likenesses thereof are trademarks of TOEI ANIMATION. All information on this web site is solely for DBGTN.com unless otherwise stated. Not to be mistaken for the official site, DBGTN.com is strictly a fan site where by no infringement is intended.
Page loaded in 0.161777 seconds.