Questions tagged as 'php'

4
answers

Why is it not advisable to use PHP codes in the same HTML document?

I was in the lab today showing a simple PHP code sample to a colleague and my teacher saw it and asked "Why are you putting PHP together with HTML?". Even without understanding much I replied that it was just a simple example that I had made to...
asked by 05.09.2017 / 02:01
1
answer

What does "::" mean in PHP? [duplicate]

In PHP, what do these four dots mean? ::? I see a lot on things like: stackOverflow :: class     
asked by 23.08.2017 / 21:32
3
answers

Select "select" element with jquery

I created on my page a select multiple and I need to get its values in PHP as vector, so I added [] to the end of the name. Example: <select id="selecionados[]" name="selecionados[]" size="20" multiple "> <option value=...
asked by 07.07.2014 / 20:20
2
answers

Why does @ disappear by clicking the link

I create a link for password reset: $mail_message .= "<a href=$url_sender/redefinir-senha?email=$email_sender&identifier=$identifier_sender&code=$confirmation_code> Clique aqui para redefinir sua senha. </a>"; But...
asked by 18.08.2014 / 20:20
2
answers

Generate CSV with side-by-side results in PHP

I'm trying to get comparative results in a CSV generated in php but I can not stack side by side in the way it illustrates EXPECTED OUTPUT attached image. I made a code below that did not break the line when it changes to 2018 TABLE...
asked by 23.04.2018 / 22:17
2
answers

check whether the day exists with if

I need to check if the day does not exist ... it does insert, if it does, it does update. I leave the practice example of what I need: if(ver se existe no banco){ .....if(){ ..........faz insert .....} }else{ .... faz updade }...
asked by 23.04.2018 / 11:47
3
answers

How to show a column, but if it has null show another sql

How to show a column, but if it has null show another sql such as a table named Task. | id | nome | nome resumido | +-----+----------+----------------+ | 1 | nome 1 | 1 | | 2 | nome 2 | 2 | | 3 | nome...
asked by 30.05.2018 / 16:36
2
answers

PHP version conflict [duplicate]

I tested a script to integrate forms with Mailchimp: <?php // MailChimp API URL $memberID = md5(strtolower($email_popup)); $dataCenter = substr($apiKey,strpos($apiKey,'-')+1); $url = 'https://' . $dataCenter . '.a...
asked by 19.05.2018 / 16:13
2
answers

Retrieve URI and Fragment Identifier (#)

I have the following url http://www.site.com/index.php#idDaDiv I would like to know if there is a $ _ SERVER [] variable or another preference feature in php that returns only index.php#idDadiv     
asked by 14.05.2018 / 17:40
3
answers

Check if $ _GET value is 1 or 2 and execute SQL UPDATE

I have $_GET['id'] and I need to check if the value it takes from url index.php?id= is 1 or 2 , and if none of the alternatives performs a die(); , if it is 1 or 2 it assigns $var = $_GET['id']; and with a i...
asked by 10.06.2014 / 18:46