Categories
Uncategorized

Zend_Acl : user Authorization with Zend Framework 1.12

Access Level Module and Controller Registration Zend_Acl and navigation Role Design for a CMS Access Roles for menu Zend Pro CMS Techniques Zend navigation Pages Zend View navigation helpers

Categories
PHP 5

Check if PHP Post Variable is set

Info from Stackoverflow if (isset($_POST[“mail”]) && !empty($_POST[“mail”])) { echo “Yes, mail is set”; }else{ echo “N0, mail is not set”; }

Categories
PHP 5

PHP short of statement (Ternanry)

More info can be found at davidwalsh $message = ‘Hello ‘.($user->is_logged_in() ? $user->get(‘first_name’) : ‘Guest’);

Categories
SQL

PHP MySQL Query based on number of results returned

$sql = “SELECT * FROM tbl”; $result = mysql_query($sql); if (mysql_num_rows($result)==0) { //do this } else { //do that }

Categories
Uncategorized

Returning the Last Insert Id Zend Framework

return $row->save();