Questions tagged as 'php'

1
answer

Does not INSERT the data in the database

Well folks, I have this code, and what happens is that since I inserted the part to upload an image it does not send anything to the database. Not a new line creates, nothing at all. Can someone help me? <? require('../cdn/lib/config.ph...
asked by 03.05.2015 / 21:02
3
answers

Why is array_shift considered to be a lentissima function?

According to the Manual, array_shift removes the first element from the array. I've seen a lot of criticism from the internet as to how to perform this function, since it reordered the entire index of the array with each removal, thus...
asked by 03.03.2015 / 14:22
1
answer

PHP - Concurrent user control?

I have a finished and working system, done entirely in ASP. I am rewriting version 2.0 of it, and as I will review it 100%, I decided to try my luck with PHP. A problem has arisen in user control: I need to be in control of how many concur...
asked by 19.03.2015 / 21:16
2
answers

Populating city and state selects with AJAX (PHP and jQuery Mobile) [duplicate]

I'm building a webapp with the framework JQuery Mobile, PHP and AJAX. In this app I have a form with selects of ESTADO and CIDADE , an AJAX has been done that when it chooses ESTADO , it loads CIDADES according...
asked by 19.06.2015 / 22:24
3
answers

Group values from an array in PHP

I have a grid-shaped form that returns the following values inside an Array: array (size=3) 0 => array (size=5) 'pei_seq' => int 0 'prg_cod_barra' => string '7899619704729' (length=13) 'pei_prg_cod' => stri...
asked by 06.03.2015 / 13:50
2
answers

Custom Search Tool Optimization

Now, I'm creating a search page that receives, via POST , information from a form containing several checkbox . See below that there are several sequences of results and one orange is marked as an example: WhenIclicksearch,theinfo...
asked by 27.02.2015 / 21:29
1
answer

How to get the correct HTTP status?

I tried to get the error "status" like this: error_page 403 /error.php; error_page 404 /error.php; But $_SERVER['REDIRECT_STATUS'] return 200 , already in Apache it returns 404 (the expected result). How can I define...
asked by 04.05.2015 / 04:06
2
answers

Converting mp3 to ogg in php on joomla

I'm trying to convert an mp3 file to ogg using ffmpeg.exe The problem is that Joomla does not let me run an external file, even in the same directory. <?php exec('C:\path\to\ffmpeg.exe -y -i file.mp3 -acodec libvorbis file.ogg'); ?> T...
asked by 29.04.2015 / 21:31
1
answer

What are the risks of writing files to the Apache server with PHP and how to avoid them?

I am writing an HTML file with part of a page, to be used later by HTMLDocX in generating a .docx file % (see this question related). To write ob_start and ob_get_clean use to put the content in a variable: ob_start();...
asked by 23.10.2015 / 06:00
2
answers

Brazilian Army Scheduling System

I have a somewhat disturbing problem, I've tried it in several ways, but I have not found a solution. Below the explanation: A very simple system, it looks like a calendar, but within each calendar day, There are 3 fields in checkbox...
asked by 14.07.2015 / 17:29