Questions tagged as 'php'

1
answer

Function similar to strip_tags

Is there any kind of strip_tags that I pass by parameter elements that I DO NOT allow? Suppose I have a string "blabkabla<span>bla<span><p>blablabla<p>" . I want to for example remove only <p> and no...
asked by 25.05.2015 / 23:06
1
answer

Automation of registers (MySQL)

Hello, everyone! I have a problem and I need your help to create a solution. My situation is this: There is a .php page that will be accessed daily by several people, this page will execute a .sql script and return a value ... Only that is wh...
asked by 24.05.2015 / 23:47
1
answer

Simple contact form sending emails via Amazon SES with PHP

For a simple contact form I want to use Amazon SES with PHP. Basically PHP will send an email to myself with the email of the user who contacted me to give an answer. Searching, I came across the following alternatives: Use the PHP Mailer...
asked by 25.05.2015 / 21:18
2
answers

PHP How to pass attribute values between classes

I have two distinct User and Comment classes, I use the CommentState class to write comments to bd, but I need the user_id attribute that is in the User class that gets in the getUsuarioId () method. When I instantiate the User object () in the...
asked by 31.03.2015 / 17:12
1
answer

Wrong pagination in Codeigniter

I have 15 ADs on my site and I did the paging for 10 ADs per page. Ok, CodeIgniter is doing paging with 10 ADs / Page, but on the second and last page CodeIgniter is showing 10, when it should only show 5. This is the Controller code: function...
asked by 30.03.2015 / 19:12
1
answer

How to save an image generated by php gd?

I'm trying to use jcrop + php gd to make image cuts and save in another directory but I do not know what the problem with my code is: <?php if ($_SERVER['REQUEST_METHOD'] == 'POST') { $targ_w = $targ_h = 150; $jpeg_quality = 90;...
asked by 21.07.2015 / 17:40
1
answer

Cakephp-file-storage 3.0 plugin does not run and does not display Error

Following the cakephp-file-storage 3.0 plugin installation tutorial (which aims to give you the ability to load and store files on virtually any type of backend storage) but did not succeed in the file upload (also in its allocation), I did not...
asked by 17.08.2015 / 20:03
1
answer

PostgreSql PHP query

Member of my group that handles in DB left us with problem. When I run the following command: Query: $query = "SELECT c.destino, c.origem, cc.data, cc.informacoes FROM " . $this -> name_entity . " c, " . $this -> name_entity . "_tres...
asked by 14.08.2015 / 19:58
1
answer

How to extract numbers preserving their formatting of a string in PHP?

I'm having a question, how can I do to extract numbers from a String in PHP preserving the formatting of it? I found a solution on the forum in English, but when extracting the numbers the default date, for example, is not preserved. $str =...
asked by 14.08.2015 / 14:32
1
answer

How to do this sql

I have the following table: table http://i62.tinypic.com/35mjjhz.jpg I use a command SELECT , type: SELECT estudante, conceito_1, conceito_2 FROM estudante WHERE etapa = '1ª' How could I make a single select to get the 2nd and...
asked by 15.08.2015 / 16:39