Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed last year. Improve this question I made …
Tag: php
PHP cookies and redirection
I have a website in two languages: English and French. And I want to redirect people based on their browser languages: if there browser language is French, I redirect people on /fr, else they go to …
preg_replace vs ereg_replace vs str_replace On This Particular Case
Using PHP, I want to generate custom MySQL dump file (due to cannot use exec and a few other reasons). So I found these 2 similar solutions: https://www.kvcodes.com/2017/10/php-create-mysql-backup …
Submitting an HTML form to a PHP file with JS validation
I’m sending data via an HTML form to a PHP file for it to be inserted into a DB with SQL script, The same form is validated with JavaScript functions. Each of the two works as expected separately, but when used together – <form method=”POST” action=”myPHPFile.php” onsubm…
multi buttons on one javascript function
foreach fetch songs from database each audio have button to pause and play all buttons of all songs works with first song only… when i press button of second or third song the first run … any solution ? blade.php js.file Answer With var player=document.getElementById(“player”); you sel…
Why does php strpos() sometimes does not work on Unicode character?
I’m building a system that categorizes woo-commerce products by their name, my product’s name is in Hebrew. I have to check in my code if a name of a product contains a Hebrew word. if I write something like: it will work properly but when I try to do it with a return from a function like here it …
PHP FPDF changing font size in specific are only
I have set font size for over all pdf to 10, Question is if I want to change the font size for the specific area of pdf without changing the font size over all, can it be done? See below code, I want to change the font size in these area $pdf->SetXY(17, 80) ; Answer Just do it like this:
Submitting form and posting to php script without reloading
I am trying to submit a form to a my PHP script that uses phpmailer to send emails. I am using a. ajax call to run the PHP script without refreshing but when I click the submit button all it does is refresh the page. Thank you. Below is my form script Below is the ajax call. Its my first
Laravel Auth:api will not persisting
I’m realizing platform web and app that work with Laravel 6 in back-end. I set auth web for platform web and auth api (with Laravel JWT) for the app. When I signin with app, Auth doesn’t persist and with subsequent calls I can’t to refresh the token nor to get user info. The code is below: r…
PHP Unicode to character conversion
I receive country names like from a library: “u00c3u0096sterreich”. How do I convert this to Österreich? Using PHP 7.3 Answer This one is a lot trickier than it seem, but the below code appears to work. First we pipe it through the standard regex for Unicode escape sequences, then pack that as a b…