Advertisement

CODE to allow users to upload only images

2017-08-12

I have the file upload.php and I want the user to download only one image. Can someone check my code and advise if it is correct or not? $file_ext = strrchr($_FILES['my_files']['name'], '.'); // Get The File Extention In The Format Of , For Instance,

(1/1) ErrorException Offset undefined: 1

2017-08-12

I was trying to update my user profile with the following controller, but the problem is that if I only update a profile image, it shows the error above ... But if I update all values ​​it updates successfully. How do I update the user profile withou

HTML Form to PHP Server Access Denied

2017-08-12

Trying to establish a connection between the html form and the sql database I'm new to coding and things. I copied a script and tried to understand them. the code works with the wampp server, does not work with the real server server. I know this cou

codeigner validates numbers and decimals

2017-08-12

Is it possible to validate both numbers and decimal values ​​using the codeigniter validation class? Because I have to give the user the input of a number or a decimal value. Eg: 10 or 1.5 or 30.45 In the validation class codeigniter, it allows to va

poedit esc_html_e - new translation

2017-08-12

I have an abc.php file. There was already a text there. In the language file, I have a .pot and .po file. In .po I translated a text from abc.php. However, when I want to add a new text in abc.php : the new text does not appear in the .pot and .po fi

PHP array_merge_recursive with foreach loop

2017-08-12

How do you merge a loop of arrays into a single array (perhaps the object) by adding each value to its associated common key? Categories: Array ( [category] => introduction [timeZone] => Europe/Stockholm [language] => Danish ) Array ( [category]

Merge data inside foreach to Laravel

2017-08-12

I create a function in the model. Variable $category=1,2,3; is a string I want this function to look in table categories and return the names of these identifiers in a variable to be like $categoryName=first,second,third public function getCategory($

PHP verification of XenForo user account data

2017-08-12

I'm trying to authenticate the XenForo user via php. My code: public function Auth($username, $password) { $userIDA = $this->getarray("SELECT * FROM xf_user WHERE username='".$username."'"); if($userIDA) { define('SESSION_BYPASS', f

Slim Framework 3 - Response Object

2017-08-12

In my Slim 3 application, I defined a middleware that adds a custom header to my response. The middleware is called before the index routing function is called. If an exception is thrown, the error handling function is called, but it appears that the