Questions tagged as 'php'

2
answers

Comment system with video

When making a comment on Facebook, for example, and add a link to the video from youtube, vimeo and others, notice that the video is automatically embedded. The same thing happens when we insert a link to an image or a website. Please note...
asked by 05.06.2014 / 16:35
1
answer

How to implement a login system in an MVC standard? [closed]

I'm studying about mvc with php , I managed to make a simple start system, but I was left with doubts on some points, such as can I implement my login system? where I should "get" the values of POST and / or GET where I should t...
asked by 03.04.2014 / 01:11
6
answers

Success message after completing PHP form

I'm trying to create a simple form to record a visit in one place. However, I'm not able to put a "Successfully submitted data" message on the same page as this form. The validation of this form, before sending to the Database, I did in PHP, acc...
asked by 04.10.2017 / 17:01
2
answers

How to separate tags from a variable in PHP array

I want to separate tags in a array in PHP, but I could not find an efficient way yet. I want to turn this: $variavel="<div><div>texto1<a>texto2</a><b>texto3</b></div>texto4</div>"; i...
asked by 13.06.2017 / 17:23
1
answer

How to use a variable in array_walk?

I am trying a solution without going through "manually" ( foreach ) an array, to add in the subarrays, a new pair of chave => valor . With array_walk I can invoke a callback and treat the array but how do I pass a variable...
asked by 12.09.2016 / 18:54
2
answers

Checking days remaining between current date and deadline for contact [duplicate]

Good afternoon folks, as per the code below, I can not check the remaining days between $ date and $ prazocontato. $consulta = mysql_query(" SELECT s.id_cliente, p.nome_servicos, s.data, s.prazocontato, s.email, s.vaifazerservicos...
asked by 25.07.2016 / 20:39
1
answer

Make button to change href="" every new access on a certain page

I have a small question in a project I'm developing. The following happens, I have 2 buttons on the page, like these ( identical in different positions ): Top of the page: <a target="_blank" class="btn-primary" href="http://localh...
asked by 11.10.2016 / 05:20
1
answer

Validate captcha with PHP

I have a captcha in a form where an image with 5 randomly generated values is displayed. How do I validate the captcha and only send the contact if the value entered in the input is equal to the one generated by the image? Excerpt from the fo...
asked by 21.09.2015 / 20:42
1
answer

Use node.js or PHP with WebSockets?

Using WebSockets for my project, in the end was an extensive project with thousands of lines of code in PHP. As soon as I finished typing everything and "finished" they told me that running WebSockets with PHP is unfeasible for large-scale us...
asked by 06.10.2015 / 04:47
1
answer

How to get the name of all user classes?

The get_declared_classes function ALL classes defined in PHP, both from the internal PHP library and the user's library. I wanted a function for classes of type: get_defined_functions , which separates PHP core functions of...
asked by 25.09.2014 / 23:10