- start session with
session_start();
at the begginging of document before anyHTML
orPHP
. - set session variable with
$_SESSION['varName'] = "value";
, it will be available on anypage that has sessions active. - unset session variables with
unset($_SESSION['varName']);
or unset all withsession_unset();
session will still be active though.
Used to use MySQL
then found out it was being depreciated, this is of course right after I got the hang of it and was almost finished with the project i was using to learn myself. So desided to make the switch to PDO
way much easier especially if you have security in mind.
For instance instead of $var = mysql_real_escape_string($_POST['data'];
, you just $var = $db->quote($_POST['data'];
. Or even better use prepared staements and the underlying driver will not only escape but quote the string for you!
So you whant to flood the market with another scrolling slideshow, popup, video enabled jQuery plugin. Here is the syntax plain and simple.
- creat your function that can be used with other libraries by wraping in anonymus function
(function($){
- name the function
$.fn.myfunction(settings){
Real simple little function will grab the $_GET[]
values and put them into an array for use with jQuery
. I didn't write it and sorry but do not remember where it came from but man has it been usefull at times.
thanks to the original author!