Month: April 2016

23
Apr
2016

Cookie Testing

bool setcookie(string name[,striung value[,int expire[,string path, string domain[, string secure]]]]) <?php if(!isset($_COOKIE[‘ordering’])){ setcookie(“Ordering”,$_POST[‘ChangeOrdering’],time()+31536000); } ?> <form method=”POST”…

23
Apr
2016

PHP OOP Practice

Without Constructors: class_lib.php <?php class person{ var $name_tame; function set_name($new_name) { $this->$name_tame=$new_name; } function get_name() { return…

12
Apr
2016

Simple PHP CRUD Tutorial

Download Whole Scripts Create Operation insert.php <?php require(“dbconfig.php”); if(count($_POST)>0) { $sql=”INSERT INTO usersinfo (username,password,firstname,lastname) VALUES (‘”.$_POST[“username”].”‘,'”.$_POST[“password”].”‘,'”.$_POST[“firstname”].”‘,'”.$_POST[“lastname”].”‘) “;…

10
Apr
2016

PHP OOP basics

Reference: Object Oriented PHP for Beginners: Page 4