Posts tagged php
Can someone explain why this PHP code is not excluding the watched videos? The email_id parameter is used to specify the location of the watched videos array. The code should remove the watched_vi...
I have a page to change the user password in my website, this page can only be used if the user have a logged in! The change password page have 3 inputs: Old Password, New Password and Con...
I need to load a site based on a cookie. I wrote code to validate that, like this. if(!isset($_COOKIE['cookie'])){ $domain = $_SERVER['SERVER_NAME']; setcookie('cookie', $cookie, time() ...
I am building an MVC cart system. I have the MERCHANTS table and the PRODUCTS table. A merchant (store) can have one or more products, everything works fine but what I want is to display products b...
By principle, I normally work with two different companies for establishing websites for myself: One for domain registration and domain-sole email address One for web application hosting My ...
I have created two PHP modules, one is a contact form module and one is a a sticky "call now" module. I can access the contact form by example.com/contact_form.php but in contrast, example.com/cal...
Try It Online! is an online interpreter for many supported languages, including PHP. I'm trying to solve coding challenges using the language, specifically "Hello, {name}!". In PHP, you can litera...
I am developing a modular HTML-PHP-CSS no-JavaScript (JavaScriptless) contact form and the HTML is becoming increasingly large, around 80 lines (and could easily grow to be significantly larger as ...
When I review JavaScript files in various text editors (Visual Studio Code, Greasemonkey/Tampermonkey) I sometimes get notified about syntax errors. I never encountered this behavior with PHP file...
I have an HTML-PHP-CSS contact form with a date field: <input type="date" name="date" id="cf_input_date"></input> The default value in this field is the W3C built-in default: dd/m...
On a CentOS Apache-MySQL-PHP environment I have a website with a simple HTML-PHP-CSS contact form; the contact form itself is working. This is how I backendly redirect a user from the contact form...
As a non PHP programmer I have tried to program some basic PHP mail() function code to send Right To Left (RTL) contact form messages to my local email client (i.e. an email client which is affilia...
I host my website on a CentOS-Bash, PHP and MySQL environment; my local email client is engined by Roundcube. I don't know almost anything about PHP nuances. While my web domain registration is do...
I have a simple HTML-PHP-CSS contact form (no JavaScript) with an input type="url" field. Currently in 30/03/2021, the default behavior of input type="url" (by W3C design I guess) is to obligate t...
I transfer emails from my Right To Left (RTL) contact form → to my local email box (powered by Roundcube). Emails reach my email box (inbox) just fine but I have a problem were PHP variables aren'...
I consider to make my website's contact form totally javascriptless (only HTML-PHP-CSS --- no JavaScript at all). No modals or alerts No prevent default No AJAX/AJAX/XHR/JHR No form disappear...
I host my website on a PaaS-modeled, shared hosting environment by SiteGround which is quite a well known hosting company with (as I believe) well-venerated email servers. I am trying to create ...
How do I mock tempnam() with vfsStream for code that uses it to create temporary files (for example, in a PHPUnit test)?
I have a PHP script that uses CURL to return a JSON result that looks //Curl set up code $result = curl_exec($ch); //Error checking code $json = json_decode($result, true); //Code to process r...
In PHP one can either use include or require to include files, the difference is that if the file doesn't exist it will emit a fatal error and halt with a require and only emit a warning with inclu...
I have a very large table that I need to iterate through with a PHP script and I can't do all of the results at once so I do it in sections with a LIMIT like for ($x = 0; $x < 10000000; $x += 1...
The objective here is to create a set of square kml coordinates centered on a point. I use this to create a square map centered on a mountain peak and then turn that into a STL that I can 3D print....
I have a number of command line PHP scripts that are either run by a user or by Windows Task Scheduler. These scripts use DB and API credentials and I am wondering if there is a better way of stori...