Questions tagged as 'php'

2
answers

PDF view in iframe

I already have some time I'm looking for how to view the PDF files in an iframe or a div on the page itself instead of opening it in a new one and using Adobe Reader. But the problem is that the files are not fixed, they come from a code that...
asked by 25.03.2014 / 18:42
1
answer

Error creating new user in Moodle via webservice

I have tried adding a new user to Moodle using their api webservice I have already modified the parameters passed through post several times, tried using an array instead of an object, tested some changes in the array structure that is passed...
asked by 18.12.2013 / 15:04
2
answers

Add values from a select when repeating the client id

How could I sum the values of a select when it repeats the client id? Example Use this select: $servername = "localhost"; $username = "username"; $password = "password"; $dbname = "myDB"; // Create connection $conn = new mysqli($serve...
asked by 28.12.2018 / 11:54
1
answer

How to remove non-alphanumeric characters without losing accent?

I'm able to remove the non-alphanumeric as follows preg_replace('/[^a-z0-9\s]/i', null, $string ); But in this way I'm losing the accentuation of words, does anyone have an answer?     
asked by 02.11.2014 / 00:55
2
answers

Color of HTML code inside string in PhpStorm

When I insert an echo or a PHP variable that receives a string with HTML code, PhpStorm does not stay in the default color that would be all yellow, as in Sublime for example, and this ends up confusing enough when parsing the code. Example:...
asked by 28.10.2014 / 13:49
3
answers

Count how many days you have today for the bank date

I need to create a PHP application that reads the date of a column within the database in MYSQL and compares with today's date, after comparing it should print the difference of days. Example: The bank contains the following date: 2017-08-31,...
asked by 28.09.2017 / 15:45
1
answer

PHP Return AD user

I have the following query, which searches for the full name of the AD registered user: <?php //Conexao com AD $ldapconfig['host']= '192.168.203.99'; //AD-001 $ldapconfig['port']= '389'; //Porta Padrão $ldapconfig['dn'] = ""; $domain= 'pec...
asked by 11.04.2018 / 16:42
1
answer

How to change the contents of a DIV if you are using adblock

Hey guys, on my site has a button inside a div: <div class="novolinkdedownload"> <a href="#" class="btn btn-primary" id="butdedownlaodnovo">BAIXAR AGORA</a> </div> Is there any way for the user to use the famous adbl...
asked by 26.04.2018 / 11:01
2
answers

How to validate inserted value in text field with php?

I have a project, which consists of pulling a code inserted by the user in the following field <input type=text name=CODNOME><br> by putting the following value 001 into an msg <?php $CODNOME = '001' echo " testetes"; ?>...
asked by 16.03.2018 / 13:30
2
answers

Optimization, quickness in select, and PHP code

Following the reasoning of this question , I did this method, where I select multiple users from once to return only 1 in random order, that is, my query that is in the function makes a sweep in the whole table to return only one result, this i...
asked by 08.12.2017 / 20:38