Saturday 21 February 2015

Prevent SQL injection in PHP?

Use prepared statements and parameterized queries for sql injection attacks.SQL statements that are sent to and parsed by the database server separately from any parameters. This way it is impossible for an attacker to inject malicious SQL.
You basically have two options to achieve this:
Using PDO:

 
$stmt = $dbConnection->prepare('SELECT * FROM employees WHERE name = ?');
$stmt->bind_param('s', $name);

$stmt->execute();

$result = $stmt->get_result();
while ($row = $result->fetch_assoc()) {
// do something with $row
}
 
http://www.phptrick.in/php-arrays/ 
 
 
minify js to increase speed, on line tools available to minify 


<?php
$count_posts = wp_count_posts();

$published_posts = $count_posts->publish;
?>

Wednesday 18 February 2015

code for moveavle header in website

.head{
position: fixed;
float: left;
width: 100%;
z-index: 9999;
background:rgba(0,0,0, 0.5);
}

Monday 16 February 2015

sample php tasks yii details

https://ephptutorial.wordpress.com/beginners-skillsets-to-be-achieved-to-become-php-programmer/  --- yii tutorial

Saturday 14 February 2015

recent projects

   februray(2015)
1. incargo site - budget($400)
2. japan teen - budget($500)
3. mantra-wild - budget($300 one page site)
4. fashion website(NA)
5. bookingplugin site(theme integration part)
6. 

Tuesday 10 February 2015

Remove headers already sent error

for this open wp-config file. remove any space before <?php or after ?>

then open page in notepad++ select encoding ansi first option save. uplaod errors will be removed