Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Muhammad Umer Farooq Lablnet

🏠
Working from home
Block or report user

Report or block Lablnet

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View zest.html
<h1>Before Using Zest Framework</h1><p>
Before using Zest Framework it is important to understand why it is a good idea to use the Zest Framework.</p><p>As for PHP, there are many PHP frameworks available nowadays, so the question is raised as to why we should use ZestFramework.</p><p>The main purpose of Zest framework is to provide a very lightweight framework without any external dependencies except core and autoloader. So in this case Zest Framework is very light in weight the core files size of zest framework is less then one 1MB
</p><div><h1>Key benefits</h1>
Zest is a simple/light weight yet powerful PHP MVC framework for rapid application development that is suited for small to medium and large scale apps and APIs.
<h2>Advance Routing system</h2>
Zest Framework provides advance routing system
<ol>
<li>Flexible regular expression routing</li>
View register.php
<?php
function sanitizeInput ($inputText){
$inputText = strip_tags($inputText);
$inputText = str_replace(" ", "", $inputText);
return $inputText;
}
function sanitizeString ($inputText){
$inputText = strip_tags($inputText);
View Database.php
<?php
try{
$db = new PDO("mysql:host=localhost;dbname=lablnet_cms", "root" ,"");
$db->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
$db->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);
}catch(Exception $e){
die($e->getMessage());
}
?>
@Lablnet
Lablnet / JSON.php
Last active Jul 13, 2017
How to export database records in json file
View JSON.php
<?php
require_once "db.php";
$sth=$db->prepare("select * from users");
$sth->execute();
while($row = $sth->fetchObject())
{
$id=$row->id;
$fname = $row->fname;
$lname = $row->lname;
$username = $row->username;
You can’t perform that action at this time.