Beginner in web coding, I have issue to code a sharing button that lead to whatsapp and that share a countdown. I achieve it with static string but I can’t load a variable in it… Does someone know …
PHP and jQuery/Ajax auto logout with header(Location)
In my Dashboard.php I call an Ajax Request every 800ms that fetches data from a php file and changes the inner html of an element on my Dashboard.php. I use it to display a 60 seconds coundown since …
How to add correctly 2 items in this JSON? – Laravel
I must save x2 the same data fields (nif and name) at the same time in the DB. With 1 field (nif) it works perfectly and save x2 rows in the DB with different info, so the JSON works, but adding the …
Redirect route with data in Laravel Vue Inertia stack
In my controller i have public function store(Request $request) { $postData = $this->validate($request, [ ‘name’ => ‘required’, ‘status’ => ‘required | …
How can I give an html element an ID taken from a php variable?
I am creating a website which uses php to get data from a phpmyadmin database and use the info from this database in my html. I have this php query which finds the value from the ‘ID’ field and then creates a variable called ‘$studentID’ with this value (which will be the number 2 in t…
You have chosen to open application/octet-stream – wordpress
I have set up nginx on Ubuntu 20.4 and installed PHP 7.4.3. Here is the content of /etc/nginx/sites-available/default server { listen 80; server_name www.example.com; rewrite ^(.*) http://…
PHP Upload Multiple Images through Loop
I am trying to upload multiple images in a loop but for some reason it will create the directory, upload 1 file and create the MySQL record so I’m not sure why it only uploads 1 file even though when i’ve printed $i to see how many files have been counted it always counts the correct amount. PHP H…
why is WordPress printing my array instead of just constructing it?
I am trying to apply a custom view to all the results of a visit to a taxonomy page, which involves wrapping the whole lot of results in some DOM boilerplate and then invoking the function to display …
How to use properly the routing post
I have my welcome page with all the Object. At this point, my url is localhost/object-list I have in my web.php a post : Route::post(‘/create-object’, [ObjectController::class, ‘createObject’]) -&…
Increment variable date in PHP
I am grabbing the post published date (WordPress) and trying to add 2 days to it to create a post expiry date. But I am throwing the following error: Notice: A non well formed numeric value encountered Here is my code: Can anyone point out my error here please? Answer When using slashes to separate your date …