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…
Convert string to multidimensional array to calculate date in php
I have a string as below Mon[3,9] Tue[3,9] Wed[5,9] Thu[5,11] Fri[5,11] Sat[5,11] Sun[4,10] I want to break this string to multidimensional array and store days like Mon,Tue,Wed as keys and the …
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…
Parse error: syntax error, unexpected ‘:’, expecting ‘{‘ in . Error when require_once autoload.php
I have problem when trying to connect to google api php client. Although this version was introduced for use with php 5.6 and above, it is actually not true of the structure of php5.6. My php version …
FPDF setting 2 consecutive values in one cell
I just need to find out how to set 2 values from MySQL database in a FPDF. The values will be consecutive with a ‘dash’ in between them. Here is an example of what I want to do. $pdf->Cell(110, 7,$…