I downloaded and installed php7 from: http://windows.php.net/qa/#php-7.0-ts-VC14-x64 The php codes are running fine. I am not able to connect database using ‘mysqli’ Class. It says Class ‘mysqli’ …
Tag: php
Password in confirm box Javascript
I have a Delete button in my PHP page which deletes a record. But when I delete that button I do a confirm box with: Can I make it so when they confirm they have to fill in a password? So what I mean is something like this And then they have to fill in a password Thanks in advance.
Insert spaces into a string at each change of character
I’m trying to create a string with a blank space between all “different characters, for example: I tried the following recursive function, not knowing if this is the best way because I couldn’t find any build-in function in PHP for this. For some reason, this function seems to iterate infini…
How can I set session variable with JavaScript
By using below code on button click I get the href attribute value, until this everything is fine but when I got my href link on button click we want to store it in the session variable (i.e. var href) because we also use this variable elsewhere. Please suggest me how to store JavaScript variable in session.?…
Class ‘Memcached’ not found in laravel
I am trying to run simple code of cache using memcache in my laravel project. I have added CACHE_DRIVER=memcached in my .env file. I have created folder of memcache in C drive and added a file memcache.exe in that, and run in cmd by opening it as administrator. my code in route is: when I run this route, i ge…
how to reduce image size or quality to specific size when upload
in a PHP query form i’m trying to set limit for the image size whenever user upload any size of image automatically reduces to a specific size. i don’t have any idea, so give me some suggestion to do …
Get earliest Y-m-d date value in a multidimensional array from qualifying rows
I want to get the minimum date from the date column of a multidimensional array, but only from rows with keycode of 0001. How would I achieve that? Expected result: 2015-08-01 Answer I would first extract all of the values that have a keycode of 0001 and create a new array of just those dates. Then use the ph…
Find known string in file then add string prior to it
I need to find a known string inside a config file and then add some content(another string) prior to this. What is the most efficient way to do this? Example: filetomodify.config Desired outcome: I’ve been using fopen to access the file but this only allows to prepend or append content, by default with…
Setting Up Windows Authentication for Apache
To begin, I’ve been searching the internet for about an hour trying to find out how to do this with no success – therefore I’m writing this question. I have an intranet site that requires to access the users Windows Username (not the server running Apache, but a user accessing the intranet s…
Laravel – Set global variable from settings table
I’m trying to store all my settings from my settings table into a global variable, but I’m stucked now(I have no idea what’s the next step), this is my actual model and seeder: model – Settings.php seeder – SettingsTableSeeder.php How can I store all the data inside the settings …