Questions tagged as 'php'

2
answers

Laravel BelongsToMany

I have a user table that makes relationship with profile belongsTo , and the profile makes relationship with items from area belongsToMany , and items from area makes relationship with area belongsTo , it is bringing my item fr...
asked by 09.12.2014 / 17:58
2
answers

slideToggle hides multiple divs when to hide / display only one at a time

I have several records in PHP, and when I click on a link "More information" opens a <div> hidden, but clicking this link opens the <div> hidden from all records. My Javascript code is as follows: function abre...
asked by 18.06.2015 / 20:13
1
answer

Clone Input text and pass the value of the cloned input via POST

I need to clone an input text by clicking a "+" button and then pass the value of this cloned field via POST next to the other form data ... I'm using a JavaScript function to make the clones <script> function mais(campo1, campo2) {...
asked by 19.06.2015 / 08:06
1
answer

Data returned in request Ajax + PHP

I have this Ajax that takes the return of a PHP script. For this, I gave an "echo" in php and it returned the data. If I want to work with more than one data, will I have to create an ajax for each field? For example: I put the badge in a field...
asked by 19.06.2015 / 21:25
1
answer

Using get_magic_quotes_gpc with stripslashes is a bad practice for compatibility?

magic_quotes_gpc is obsolete since PHP5.3 and removed in PHP5.4, but can still be enabled in 5.3, I know that it is unlikely that a production server has such a configuration, but the doubt here is yet another case study. I used to u...
asked by 10.01.2016 / 19:49
1
answer

Field disabled does not pass to $ _POST

I have problems with the field that I disable if one of the options is checked, but when the field is as desabled it does not pass values to PHP. I would like to know how to check whether the value exists or not, and if it does not exi...
asked by 22.01.2016 / 16:16
2
answers

Check tab type in a CSV file

I've set up a script to import CSV with PHP but I'm having difficulty checking the type of CSV formatting. I need to check if it is separated by , or ; or \t or : or | , but I can not....
asked by 16.06.2015 / 19:04
2
answers

dompdf php to pdf

I'm using DomPDF to generate the pdf. The question is that I can not convert my html to pdf. My html is generated by several php lines with variables and etc ... I have tried to pass a variable with everything to DomPDF::loadhtml...
asked by 19.01.2016 / 12:13
2
answers

Select random with SQLServer (mssql)

What is the correct way to make an unspecified (random) selection using PHP + SQLServer, since Microsoft queries do not accept MYSQL's ORDER BY RAND (). Using MYSQLI would look like this: $sql ="SELECT * FROM Tabela where campo=‘algum' ord...
asked by 15.01.2016 / 19:00
2
answers

Handling Array in PHP

I'm creating a PHP that creates graphs using the Google Charts, but i can not supply the function with all data from the array. When I print the function, instead of him print all the states of the array, it only prints the first. I'm doing as f...
asked by 24.03.2014 / 21:04