Questions tagged as 'php'

1
answer

CRUD PHP Do not update and give no error

I'm having problems when I try to run an UPDATE on my system in PHP + MySQL. I have the file code edit: <?php require_once 'init.php'; // resgata os valores do formulario $nome = isset($_POST['nome']) ? $_POST['nome']: null; $nasciment...
asked by 02.01.2017 / 22:34
1
answer

Which correct way to do UPDATE

Friends this error ( SQLSTATE[HY093]: Invalid parameter number: parameter was not defined ), what is the correct way to apply UPDATE according to the code below? DB fields id_seguradora nome_seguradora cnpj_seguradora tel_segurado...
asked by 14.01.2017 / 15:53
1
answer

Foreach for array

I have an array and I need to know how I can do foreach and know the total size of the array. $matriz = array(); $matriz[0][1] = '01'; $matriz[0][2] = '02'; $matriz[1][1] = '11'; $matriz[1][2] = '12';     
asked by 25.10.2016 / 00:26
1
answer

What is the correct permission for folders on linux servers in production? [duplicate]

Reading the PHP manual and some tutorials I was in doubt about what permission to leave in the folders after image uploads. Some tutorials speak to leave as 0755, others like 0750, which one to use in this case for application security...
asked by 19.10.2016 / 23:43
2
answers

How to use echo in a Laravel view?

I want my layout blade echo only if the $errors variable is set: @section('mensagens') <div class="container"> <div class="row"> <div class="col-md-2"></div> {{...
asked by 01.11.2016 / 14:17
1
answer

How to encrypt multiple variables inside a file with php?

I'm using php to read a file for a $string , it has some variable words that I need to find and replace with others, ie I need to get these variables, encrypt them with AES and write back where they were, making a replace . The...
asked by 19.10.2016 / 06:16
1
answer

Error !!! You did not select the file to upload. Codeigniter

I have a problem uploading the image and registering it in my database. In my database I have a table called tbl_article where there is a when going to the image in question called image_item with a varchar (80): In the view like this: &...
asked by 11.10.2016 / 14:37
1
answer

Problems exporting from PHP to CSV

I'm having trouble viewing a csv file. My intention is that I can use the Excel command "data to column" and stay line by line, but the file has skipped line making it impossible. The code was made based on another example here even posted by an...
asked by 18.10.2016 / 18:44
1
answer

Sort numbers in a session?

I have a table where users select multiple numbers and are written to $_SESSION , so that's fine, but I need these numbers to appear in ascending order: Example of $_SESSION gravada = 22-20-38-54-52-42-34-18-70-75 I need to ap...
asked by 21.06.2017 / 18:13
1
answer

Check special characters input

I'm trying to validate my form and capture special characters using preg_match(..., ...) , but with no success. Either using @ or without it, I get the following message:    Special characters detected, if you are using @ , remove it...
asked by 28.06.2017 / 18:31