020 555 1111
  • Old fashion, modular, procedural PHP plus some scaffolding techniques to allow it to mimic MVC simplicity.
  • A quick reference to help you find in PHP maze what needs to be done and how to do it.
  • Learn a PHP Object Oriented Programming by building a live discussion forum application.
  • MVC - Model View Controller - real life, easy reference and application.
This product has options, take a look at them and select ones you like the most.
Options are displayed under image section.

Getting id of last insert: lastInsertId
[PDO example]

 

Returns the ID of the last inserted row or sequence value.

 

//$cid is a last insert id value
$sql = "INSERT INTO countries (cname, ciso2, ciso3) VALUES (:cname, :ciso2, :ciso3)";
	$stm = $this->db->prepare($sql);
	$stm->execute(array(
	    ':cname' => $_POST['cname'],
	    ':ciso2' => $_POST['ciso2'],
	    ':ciso3' => $_POST['ciso3']
	));
	$cid = $this->db->lastInsertId();