Skip to content

Tag: php

Generate random username based on full name php

I want to grab the first name in lowercase then concatenate the first two characters after the space and finally concatenate that with a random number from 0 to 100. So if my name is “Mike Test” I want the output to be: mikete3 My function outputs “mike te84” and I don’t know how…

Mysqli last insert id not work

I am trying to get last query insert id.but my code always return zero. My Code here return mysqli_insert_id($this->Cnn()); always return zero Answer Please check the definition of mysqli_insert_id:- The mysqli_insert_id() function returns the id (generated with AUTO_INCREMENT) used in the last query. It m…

Chmod 640 for uploaded file after SUPEE 7405 patch

After installing the SUPEE 7405 patch, we noticed a problem uploading images from the admin. All file permissions are being set to CHMOD 640 which makes them inaccessible to all users. Is there a solution that does not involve rewriting the /lib/Varien/File/Uploader.php file? Answer A new version of SUPEE-740…