I am running the following check in PHP (in a Slim middleware) to make sure that a certain session variable exists: However, my error log is swamped with the following: What can I do to have this not show as an error? I found a solution here: PHP: Notice Undefined index even using isset but my case is differe…
Tag: php
How to JOIN MySQL tables with specific ID of each table with PHP
I don’t know how to join tables and fetch informations from each of them. I have clients, who has made reservations and when I click on specific client I need not only information about him from clients table, but also need information related to him by id from reservations table. This is my ER diagram …
Show the amount of files uploaded at the right of an input
i am creating a form with a input=file, my problem is that when i added CSS to this, the number of files updated dissapear, i know that is because i put display=none in the CSS, but i need them to appear, or people won’t know the file uploaded correctly, is there a way to make this? i prefer without uss…
multiple dropzone upload on 1 single line mysql
I’m trying to upload multiple files at the same time and insert the file paths on 1 single mysql line per upload, but this adds one line per file. Looks to me like my js dropzone setup is good but it doesn’t work on a single line but it adds one line per file in the database Thank you for
Loop Through Nested JSON Response PHP
I’m trying to loop through and return data (‘rank’ from ‘rank_details’) from a returned JSON response. Here is a snippet of the JSON response (what I’m getting from: $array = json_decode($apiResponse);…
Using PHP echoed options in JavaScript generated select options
WHAT AM I DOING? I am making a transaction keeping application that has an option to bulk add transactions. It is a form which has a table inside. Each row of the table stands for one transaction …
Add to cart multiple tickets of single competitions in PHP Laravel
I have a website prospectcompetitions.co.uk. I want to add multiple tickets of single competitions into cart. Every single competition consist of multilple tickets. if a user select 3 tickets then add them to cart so that user can add multiple tickets of single competitions and multiple tickets of multiple co…
How can I log the full body of a POST request to a file for debugging?
I’ve read many ‘possible duplicates’ of this question and have used the code from one of them in this post but I cannot seem to see exactly what this question is asking. As part of a much bigger project unrelated to PHP or websites I need to obtain the body of a POST request to my shared ser…
PHP for loop only works every second row
in my current project I want to split 10 users from a queue into 2 teams with 5 users each. When 10 users are in the queue the function create_new_lobby() is executed. In this function the match is …
Count number of columns in array php?
I have a simple function to count numbers of columns with specific value in the array: it works well while accept exists in the array. If not I get Undefined index: Accept. My array looks like that: How can I add something like isset here? Answer With oneliner is it not possible (or the code will be messy), s…