Search found 7 matches

by kiash
Sat Aug 07, 2021 11:45 am
Forum: Databases
Topic: This is the error message SQL
Replies: 3
Views: 22277

Re: This is the error message SQL

You have made products_model field as unique property. thats why you are getting this error. I you do not required this field as unique then alter the unique attribute
by kiash
Sat Aug 07, 2021 10:36 am
Forum: Code Snippets
Topic: HTML Special Characters
Replies: 2
Views: 34477

Re: HTML Special Characters

you can use

Code: Select all

htmlentities
function to encode all html entities. it will then very safe for your code
by kiash
Sat Aug 07, 2021 10:33 am
Forum: PHP - Frameworks
Topic: Laravel Platform for ecommerce?
Replies: 2
Views: 23456

Re: Laravel Platform for ecommerce?

Yeah! Laravel will be very good option for ecommerce web site. But due to heavy dependency it will eat more computing resources that's why you have to optimize it heavily by caching
by kiash
Sat Aug 07, 2021 2:16 am
Forum: PHP - Code
Topic: php in image alt tag
Replies: 3
Views: 25782

Re: php in image alt tag

You can also use printf or spritf function to display alt tags
by kiash
Sat Aug 07, 2021 2:09 am
Forum: PHP - Code
Topic: detecting bot traffic
Replies: 2
Views: 9655

Re: detecting bot traffic

some times it is not enough to use user-agent to detect bot traffic. you can verify other headers to verify bots
by kiash
Sat Aug 07, 2021 2:01 am
Forum: PHP - Code
Topic: geo-ip
Replies: 1
Views: 5108

Re: geo-ip

You can use cloudflare to get geo ip location. it is very fast and pretty correct.

Code: Select all

$country_code = $_SERVER["HTTP_CF_IPCOUNTRY"];
by kiash
Sat Aug 07, 2021 1:54 am
Forum: PHP - Code
Topic: Prevent from SQL Injection
Replies: 5
Views: 6718

Re: Prevent from SQL Injection

You can use PDO prepere statement to prevent SQL injection. Here is the example: <?php /* Execute a prepared statement by passing an array of values */ $sql = 'SELECT name, colour, calories FROM fruit WHERE calories < :calories AND colour = :colour'; $sth = $dbh->prepare($sql, array(PDO::ATTR_CURSOR...