function JSSetCookie($CName,$CValue,$CExpr=FALSE){
// $CName is the name of the cookie
// $CValue is the value to be stored in the cookie
// $CXpr is in years
// This function will allow cookies to be set even after
// HTML has been printed on the page. It is a supplement to the
// SetCookie function when you have to output text before a cookie is set.
if($CExpr!=FALSE){
$CookieString="astr= '$CName' + '=' + '$CValue' + ';expires=' + expr + ';path=/';";
$Cookie.="\n<script language=\"javascript\">\n";
$Cookie.='function makeYearExpDate(yr){
var expire = new Date();
expire.setTime(expire.getTime() + ((yr *365) *24 * 60 * 60 * 1000));
expire = expire.toGMTString()
return expire
}
expr =makeYearExpDate('.$CExpr.');';
$Cookie.="\n".$CookieString."\n";
$Cookie.="document.cookie=astr;\n</script>\n";
}else{
$Cookie.="\n<script language=\"javascript\">\n";
$Cookie.="document.cookie='$CName=$CValue;path=/';";
$Cookie.="\n</script>\n";
}
echo $Cookie;
}
Smart Counter - This little script is a plain and simple hit counter that uses cookies to determine whether or not the visitor has already been counted. Categories : Cookies , HTML and PHP , PHP Remote Scripting: send form POST data to a script and insert the results into a page without refreshing the page. Categories : PHP , AJAX , HTML and PHP , Java Script PHP4 session helper HTML file.
Categories : PHP , Java Script , HTML and PHP , Sessions Local-to-user date and time display regardless of time zone or where the website's server is located Categories : PHP , Date Time , HTML and PHP , Java Script Store, retrieve and delete cookies using JavaScript. Categories : Java Script , Cookies , Beginner Guides , Cookies Pull Down Surfing - Surf on Change Categories : Java Script , MySQL , HTML and PHP , PHP , Databases Dynamic Calendar in PHP, Javascript and HTML. Categories : PHP , Java Script , HTML and PHP , Calendar Dynamic generation of textboxes, select items etc in a table for use with databases applications, matrimonials and for job sites Categories : PHP , HTML and PHP , Java Script Validator 98 - a PHP-script to generate form-validation-code in JavaScript. Categories : Complete Programs , Java Script , PHP , HTML and PHP This PHP function creates dropdown select lists for time and date that you can change, outputs a 14 char MySQL timestamp in a text field Categories : PHP , MySQL , Java Script , HTML and PHP Newbie Notes #9 - Hyperlinking a post Categories : PHP , Java Script , HTML and PHP , Beginner Guides Make old style (PHP3) scripts using GET, POST, COOKIE and File uploads (POST) compatible with
PHP 4.2.0 Categories : PHP , HTML and PHP , Global Variables , Cookies , Variables OverEasy - PHP generated JavaScript to do mouseovers on
your pages. Modify one file and one function does it all
for you! Categories : PHP , Java Script , HTML and PHP , MySQL PHP3: Formmail. Just a cgi formmail, but than in PHP. It is easy to use! Categories : HTML and PHP , Email , PHP , Perl , HTML and PHP Complete, simple working example of login screen and check on a unique page using php functions, cookies and mysql database. Categories : PHP , Cookies , MySQL , HTML and PHP , Authentication