Questions tagged as 'php'

2
answers

How to make Regex that accepts only numbers?

How do I use preg_match to only accept numbers? And can those numbers start with zero too? function formatacao_cpf_func(){ $regular = "/^[0-9]*$/"; if(preg_match($regular, $this->cpf)){ if(!is_numeric($this->cpf)){...
asked by 22.11.2017 / 00:11
1
answer

How to use friendly urls?

I currently use MVC in my project and when I access my system it shows a url like this: http://localhost/view/html/cliente.html What I would like to get is: localhost/cliente because it is the only file called clien...
asked by 05.03.2015 / 14:52
1
answer

Print table with ajax and php

I am trying to print a table using php, ajax and mysql. I have this stretch in Html <!DOCTYPE html> <html> <head> <title>Teste Ajax</title> <?php require("cabecalho.php"); ?> <script src="//code.j...
asked by 30.11.2017 / 17:37
2
answers

How to group dates according to the day of the week

Well, I have a table which has a column of id of user user_id and one with dates. I would like to know how to group and count the dates that are in the formed. Example: 07.06.14 on the respective days of the week and accordi...
asked by 07.06.2014 / 20:24
1
answer

Retrieve checkbox as checked with bank data?

The code below for data entry via checkbox , but do I need to retrieve the checkbox saved in the database for a possible update ? <?php include("includes/config.php"); ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Tr...
asked by 09.06.2014 / 02:47
1
answer

Insert dates into the database?

How do I insert the maximum number of days of a month via insert into codeigniter? Ex: data | campo2 camp3 01/01/2014 | 02/01/2014 | 03/01/2014 | . | . | . | 31/01/2014 |     
asked by 09.06.2014 / 20:28
1
answer

How to import firebird data into mysql?

How to import data from Firebird to Mysql using PHP ?     
asked by 18.06.2014 / 13:44
1
answer

Delete equal values within a dynamic array

I have an array with several dynamic names that can change every moment, what is the most correct way to go through this array and create a condition to exclude them from iguail? (in this case two elements with the same name) I have seen some...
asked by 03.10.2017 / 13:31
1
answer

Error with conditional formatting if document opened in Microsoft Office

When applying conditional formatting to a% spreadsheet generated with PHPExcel , it works without problems when the document is open at LibreOffice : $objConditional = new PHPExcel_Style_Conditional(); $objConditional->setConditionType(P...
asked by 07.01.2014 / 23:17
1
answer

Get value unchecked with PHP

Colleagues. I have a form that contains the following fields: PleasenotethatIhaveselectedthefirstandthirdfieldsasanorder,butwhenIregisterinthedatabase,itreturnsmeasfollows: WhenyouactuallyhadtobringmethenullID2andID3asYes.Totrytosolveit,Idid...
asked by 23.05.2017 / 23:31