Questions tagged as 'php'

2
answers

Capture words using Regular Expressions

I have the following text example:    MyRelationsPDF001-Cover-Disclaimer-22012017 I want to capture with php regular expressions the texts    "Cover", "Disclaimer" and "22012017". I'm trying to use the preg_match_all() funct...
asked by 02.08.2017 / 17:31
2
answers

How to make a preg_replace with several conditions and several changes?

How to make a PREG_REPLACE having several search and multiple substitutions at the same time For example, I want to ('/(BR|BL)/', 'B') if you have BR and BL replace with B and also ('/PH/', 'F') if you have PH replace wi...
asked by 02.09.2016 / 17:54
3
answers

form action="./" Where are you going?

I'm passing an ASP page to PHP and found a form where the action attribute had the following value: <form action="./"> . Does this action value work as a <form action="#"> ? In other words, does it point to the same p...
asked by 09.08.2017 / 15:16
2
answers

Limit the total of options in select - PHP

How to limit the number of options selected in a select so that the form is not sent above a maximum amount. For example, I want a maximum of 3 options to be sent on the form. Above that, I wanted to prevent the user from submitting the form....
asked by 21.09.2016 / 14:42
3
answers

Convert the difference between dates to string

I'm calculating in PHP the difference between datetimes (start, end), coming from a POST , need to fill a campo(time) in format(H:i:s) via INSERT in MYSQL . I get the result of the difference, but I can...
asked by 04.10.2016 / 23:04
1
answer

Send form data by array to PHP

Due to a need of the system we are working on, I need to send 3 fields as an array to a PHP. Example: <input type="text" name="name[]" /> <input type="text" name="name[]" /> <input type="text" name="name[]" /> What happe...
asked by 31.08.2016 / 22:37
1
answer

Can you make a type of "setInterval" in PHP?

To run a particular function in a time interval.     
asked by 08.10.2016 / 04:23
3
answers

Order of posts when I consult the database of my CMS

I'm developing a Site with CMS. It works perfectly just that you would like the last posts to be at the top of the page. What is happening now is that the last posts go to the bottom of the page just wanted the order to be opposite. PHP Class...
asked by 06.03.2014 / 16:48
3
answers

Query to search for value in the Database

I want to display the results obtained in a form but when saving to DB I did not save as null but saved like this: Date: 0000-00-00 E Number: 0 Query looks like this: $sql = mysql_query ("Select *, Count(*) from tabe...
asked by 07.02.2014 / 10:36
1
answer

Modify Array () form HTML result

I have the following Array () return: [item] => Array ( [data_vencimento] => Array ( [0] => 2016-12-05 [1] => 2016-12-07 [2] => 2016-12-22 )...
asked by 01.12.2016 / 18:00