So I have this tiny query to run on my DB and it works fine in MySQL Workbench. Basically, a SELECT with LEFT JOIN and UNION with LEFT JOIN again. SELECT cards.id_card, cards.hash_card, …
Tag: php
How to redirect 404 error to 404.php page?
I need help in php. I am making one portal website in Core Php. I had created 404 page and .htaccess file. 404.php: 404 Error – Page Not Found…
Open a popup box after receiving result from ajax
i have a ajax code that works properly and gives the desired result. I want to modify this code and want that when a reply is received from ajax a popup/modal box should get opened. I am able to open popup/modal box on a click of a button but don’t know how to open it automatically within ajax. here is
How to calculate total price in php
I am getting the price of the product from db using the product id i have stored in php array. i have a php function where in i want to hold a total of all the products purchased. here i am getting the cart items and i am calling the function which should hold total amount. i am passing the
Upload large files to WebDAV with resume support
I want to upload large files to ownCloud with WebDAV API. I use this code to do this: But when connection lost, this script cannot resume uploading file. Is it possible to resume file upload with WebDAV? Thanks Answer Use the CURLOPT_RESUME_FROM_LARGE option. Either set it to a position to start the resume fr…
Laravel – Where to store statuses (flags)? Model, Class or config folder?
I need to extensively use statuses in mt project. I need them for my users (active, suspended, etc), an entity (active, pending_activation, inactive) and for my subscriptions(active, on_grace_period, not_subscribed, never_subscribed). So far I thought that the best way is to store them in the DB but i have a …
Reading user command line input with PHP with readline, but bash is not default shell
I wrote a PHP script and I’m trying to read user input from the command line. I started of with which worked fine, but when typing the input the arrow keys didn’t work the way it should. I learned that this could be solved with the -e switch, so it became: Now this worked like a charm in my develo…
How can I add that subscribe to different segments?
I want to add my subscriber different segment by signup source. I create two segment in Mailchimp. How can I add that subscribe to different segments? I using API v2. Answer From the API Docs: you’ll need to add a groupings item to your merge_vars array. That should be an array of associative arrays wit…
php file automatically renamed to php.suspected
Since last 4 days, we are facing strange issue on our Production server (AWS EC2 instance) specific to only one site which is SugarCRM. Issue is /home/site_folder/public_html/include/MassUpdate.php file is renamed automatically to /home/site_folder/public_html/include/MassUpdate.php.suspected This happens 2-3…
XAMPP Installing
I am installing XAMPP and have encountered the following problem: Important! Because an activated User Account Control (UAC) on your system some functions of XAMPP are possibly restricted. With UAC please avoid to install XAMPP to C:Program Files(Missing Write permissions). Or Deactivate UAC with msconfig aft…