Questions tagged as 'php'

2
answers

Ajax does not work - send PHP data without refresh

I'm trying to send merged data from a form + PHP variables to be inserted into the DB, without refreshing the page. For this, I have a simple html form, and a PHP conditional that checks the submit form's click (this is why I have other submi...
asked by 18.01.2016 / 16:42
1
answer

Total in shopping cart

I'm having trouble with the cart, if I put $preço =$linha['preço']; it displays the value correctly, but if I put number_format down, it zeroes out the result: $preço = number_format((float) $linha['preço'] * $qtd, 2, ',', '.');...
asked by 18.01.2016 / 16:31
1
answer

AJAX appear divs according to database ID (MYSQL)

I'm trying to make every time I press the #buttonIdUltimoItem a structured DIV to get information from the database from the newest to the oldest according to ID . The problem is always repeating the last three IDs BUTTON: <button...
asked by 18.01.2016 / 17:07
1
answer

How to lock so that CSS does not change beyond Footer and Header

I wanted to know if I can lock CSS to a specific location. See the following: I have created a system where each user will define his own Header and Footer (consequently his own css). However I would like that when reading th...
asked by 19.01.2016 / 13:11
1
answer

Store PHP script output in "compressed" HTML

In a content manager, I usually generate static pages in HTML every time they are visited, the script re-writes HTML when there is a change on that page, simply deleting the previously generated file. When the user visits this page through th...
asked by 07.12.2015 / 03:01
1
answer

How can I replace multiple words without using STR_REPLACE?

For example, I want to sweat a text. How can I do it using the substitution method? Something that is faster. Using str_replace() is not very fast.     
asked by 29.01.2016 / 18:10
1
answer

Change JSON file on the server

I have the following form: <form method="POST"> Title <input type="text" onchange="Function()"> X <input type="text" onchange="Function()"> Y <input type="text" onchange="Function()"> /* others fields */ &...
asked by 05.12.2015 / 00:39
2
answers

Search by date php pdo

I need to search the database using the DtBase column, for example: on day 26 I populated the table with several information, on day 28 I want to see what I did on day 26. I want an input date or another method that it is more feasible for me...
asked by 26.01.2016 / 16:34
1
answer

How to validate md5 password with database? [closed]

In the database it is already encrypted with md5 , when I try to log in using: email: [email protected] | senha: 123456 **ACESSO NEGADO** and email: [email protected] | senha: criptografada md5 **ACESSO LIBERADO** Follow the code &l...
asked by 22.01.2016 / 03:16
1
answer

send the variable from javascript to php [duplicate]

I have this sum1 variable in javascript and would like to send it to php how can I do this? JS var sum1 = 0.0; $('.class_nao_pago').each(function() { sum1 += parseFloat($(this).text()); PHP echo $sum1     
asked by 28.01.2016 / 13:30