Questions tagged as 'php'

2
answers

Convert function for next ASP to PHP

I have this function in ASP and need to convert to PHP DATA: cod = "01A" ou cod = "01B" ou cod = "01C" titulo = "Novidade" FUNCTION: letra = right(cod,1) str = array("A","B","C") for i = lBound(str) to ubound(str) if (instr(1,letr...
asked by 11.09.2017 / 10:32
3
answers

Is using filter_var () enough to avoid SQL injection?

Is there a way to prevent the input variables in a query in MySQL using filter_var?     
asked by 23.06.2016 / 15:26
2
answers

how do I redirect a page by clicking on an option from a select by google chrome?

I am using this jquery already tried to use the change also but it does not execute <script> $(document).ready(function(){ $("#select-native-fc").on('click', function(){ if($("#select-native-fc").val() == "ASM2")...
asked by 24.06.2016 / 15:17
1
answer

Showing validation errors in the contact form

I have this contact form and would like you to see all validation errors when you have, for example, if you leave the name and email field unfilled, when submitting the return returned these two errors, in the current code only shows an error, e...
asked by 21.06.2016 / 00:23
2
answers

Database Search with select value

How do I perform a search in the database, through a parameter reported by the tag select ? Follow the code below: <select class="form-control" id="inputUnidade"> <option>Selecione</option> <option&g...
asked by 28.01.2016 / 12:34
1
answer

The end of a catch in a regular expression

I do not know which title could get better than this, as I do not quite understand technical terms related to the regular expression. But I will describe my problem. I have a code, where I generate a regular expression to be able to capture a...
asked by 29.01.2016 / 13:11
3
answers

Pass Cursor to the Next Field of the Form

I have a form with several inputs, combos and etc. How can I do that when the user selects an option in the combo the cursor already jumps to the next field of the form? Also make sure that when the user completes a field that has a certai...
asked by 05.02.2016 / 18:05
1
answer

Why does "echo" accept parentheses in PHP?

In PHP, can echo receive parentheses because it considers this an expression? Apparently, some language features do not seem to be standardized and therefore can be used in a number of ways. For example: echo ('teste'); Or else:...
asked by 21.11.2018 / 16:02
1
answer

How to filter time in a datime field in eloquent?

How can I compare if a time is equal to a time stored in a datetime column using Eloquent?     
asked by 25.10.2018 / 19:24
2
answers

PDO does it use syntax of some DBMS or do they all work?

When considering PDO usage , one of the key usability is the scope of multiple databases . Example scenario Different ways to filter 5 records, which vary depending on the database: SELECT TOP 5 campo FROM tabela SELECT campo FROM ta...
asked by 03.10.2018 / 13:35