google language translator in web site php

11. October 2017 General Topic 0
<div id=”google_translate_element”></div> <script type=”text/javascript”> function googleTranslateElementInit() { new google.translate.TranslateElement({pageLanguage: ‘en’}, ‘google_translate_element’); } </script> <script type=”text/javascript” src=”//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit”></script>    

File uploading in PHP and save record in database.

10. October 2017 General Topic, Interview, PHP 0
function upload_kyc($user_id) { @extract($_POST); $target = “user/image/idcard”; $uploaddir =$target.’/’. $user_id.’/’; chmod(“$uploaddir”, 0777); $uploadfile = $uploaddir . basename($_FILES[‘userfile’][‘name’]); $imageFileType = pathinfo($uploadfile,PATHINFO_EXTENSION); if($_FILES[‘userfile’][‘name’]==””) { return array(‘status’ => 400,’status_message’ =>’Please select an image to upload!.’); } else if (file_exists($uploadfile)) { //echo “Sorry, file already exists.”; return array(‘status’ => 400,’status_message’ =>’Sorry, file already exists.’); } elseif ($_FILES[“uploadfile”][“size”] > 500000) ...

difference between strstr and stristr in php

Both function return substring, find the first occurrence of and return the rest of the string, main difference is that STRSTR() is case sensitive and STRISTR() is insensitive STRSTR $str = “sadanada singh Chauhan is the same as sadananda chauhan”; echo strstr($str,’chauhan’); OUTPUT:-chauhan STRISTR $str = “sadanada singh Chauhan is the same as sadananda chauhan”; ...

What is use of normalization in database?

15. March 2017 Mysql 0
Normalization used to reduce data redundancy and improve data integrity. Normalization and Anomalies:- Anomalies:- Tables having redundant data known as anomalies, redundancy is the dublication of the data. Three Type of Anomalies:- 1)Insert Anomaly 2)Delete Anomaly 3)Update Anomaly Normalization:- This is database design technique to reduce data redundancy using different normal form 1st NF, 2nd ...