difference between cookie and session in php
cookies are stored in the user's browser,but and sessions are stored in server machine. This difference determines what each is best used for.
A cookie can keep information in the user's browser until deleted. If a person has a login and password, this can be set as a cookie in their browser so they do not have to re-login to your website every time they visit. You can store almost anything in a browser cookie. The trouble is that a user can block cookies or delete them at any time. If, for example, your website's shopping cart utilized cookies, and a person had their browser set to block them, then they could not shop at your website.
md5 function in php
md5 function in php
md5() calculates the MD5 hash of a string
syntax of md5
md5(string,raw)
example of md5 function in php
<?php
$str = "Hello";
echo md5($str);
?>
results will be
8b1a9953c4611296a827abf8c47804d7
md5() calculates the MD5 hash of a string
syntax of md5
md5(string,raw)
example of md5 function in php
<?php
$str = "Hello";
echo md5($str);
?>
results will be
8b1a9953c4611296a827abf8c47804d7
php substring
php substring
substr() function returns a part of a string.
substr syntax
substr(string,start,length)
example substr
<?php
echo substr("php simple qa",3);
?>
result will be:php
substr() function returns a part of a string.
substr syntax
substr(string,start,length)
example substr
<?php
echo substr("php simple qa",3);
?>
result will be:php
Subscribe to:
Posts (Atom)