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:
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;
?>