File Validation

http://www.mentzer-consult.de/?afinoes=bin%C3%A4re-optionen-geb%C3%BChren&fde=2b Here is a simple function to valid a image file. You can modify/add extensions and mime type according to your needs. function checkImageTypeArray($file) { $errorarray=array(); $allowExtension = array(“gif”, “jpeg”, “jpg”, “png”); $allowMime = array(“image/gif”, “image/jpesg”, “image/pjpeg”, “image/x-png”,”image/png”); $getFileExtension = pathinfo($file[‘name’],PATHINFO_EXTENSION);…

click

http://aquanetta.pl/?kostromesp=opcje-binarne-pdf-chomikuj&bc6=81 Continue reading

click

Transaction in PHP Mysql

comment faire rencontre avec facebook This is how easily you can implement tractions in mysqli and PHP. $link = mysqli_connect(‘localhost’,’root’,”,’test’); // Check connection if (mysqli_connect_errno()) { die(‘error’); } mysqli_autocommit($link, FALSE); //disable autocommit $query=”insert into tb1 (username,pwd) values(‘pp’,’sdsd’)”; $queryres=mysqli_query($link, $query); if(!$queryres) { echo “error first query”;…

follow url Continue reading

Get Project Path with Protocol

go Here is how you can absolute project url with for http and htts both:: $protocol = stripos($_SERVER[‘SERVER_PROTOCOL’],’https’) === true ? ‘https://’ : ‘http://’; echo $protocol.$_SERVER[‘HTTP_HOST’].$_SERVER[‘PHP_SELF’];

Page 3 of 41234