PHP

Md5 Password is Not Secure Enough – PHP

Md5 password is obviously better than simple characters but hashED & saltED passwords are better than just Md5. Firstly I will explain how to save a password in MySQL as a Md5 password Change the datatype of password to CHAR(32) in the MySQL table In php code retrieve the password using the md5() function which(…)

Cannot modify header information – headers already sent by :

I was tired of encountering the following error when I was working on one of my PHP project Cannot modify header information – headers already sent by (output started at……. I did resolve it after all, the thing I was doing wrong was that I had left a lot of blank lines & spaces between(…)

Facebook Architecture: 500 million users – is not the limit

The film “social network” is well illustrated by the phenomenon of Facebook’s development, managed to collect a record time of fabulous, unthinkable before the audience. However, behind the scenes remained another component of the project – how it works inside. His technical device. What is Facebook now? This is best demonstrated dry figures: * 500(…)

Send simple Mail

To simply just send an email with subject & message you just need to use the following code mail($to,$subject,$message,$headers); where $headers  = ‘MIME-Version: 1.0’ . “\r\n”; $headers .= ‘Content-type: text/html; charset=iso-8859-1’ . “\r\n”; $headers .= ‘From: Me <my@example.com>’ . “\r\n”; $headers .= ‘Cc: andyou@example.com’ . “\r\n”; $headers .= ‘Bcc: someone@example.com’ . “\r\n”; You need to change the ini settings for the mail setting in the PHP.ini file [mail function] ; For Win32 only. SMTP = localhost //change this to your(…)

Warning/Fatal Error/….

Warning: require_once(../config.php) [function.require-once]: failed to open stream: No such file or directory in<path of website>\wwwroot\library\category-functions.php on line 2 Fatal error: require_once() [function.require]: Failed opening required ‘../config.php’ (include_path=’.;C:\PHP-Pear\pear’) in <path of website>\wwwroot\library\category-functions.php on line 2 Finding a solution. will get back on this shortly!!

Next Step – Functions & Variables

Next step to understanding PHP is by understanding how to declare functions & simply implement them & obviously how to declare variables in functions & use them beautifully on different pages without any hassle Example extracted from Multitasking ‘action’ post On retrieval of this we call this() function on the resultpage.php . the this() & that()(…)

Arrays in PHP are soo simple

Arrays are very simple in PHP to create an array you simply need to declare a variable $var=array(); to save result retrieved from database into an array while ($row = dbFetchAssoc($result)) { $var[] = $row; } to extract use extract($var); to count the no of rows in an array count($var); isn’t that Fun 🙂

Multi-tasking ‘action’

$action = (isset($_REQUEST[‘action’]) && $_REQUEST[‘action’] != ”) ? $_REQUEST[‘action’] : ‘all’; This appears on the RESULT page if you have to connect from various pages to one page & different output in same format on that page then the above code is really helpful along with the switch($action) case : statement; break; switch ($action) {(…)

what to learn in php?

Yes ofcourse that was the big question when I got interested in PHP. The whats & how was troubling alot.Now I kinda know PHP – Still learning but that is always PHP steps to understanding Section 1  Formulation of a Plan of Project what site, content, target audience, reason of making site, functions, uniqueness, extent,(…)