Questions tagged as 'php'

1
answer

Format Array differently

I have the following array() : Array ( [valor] => Array ( [0] => 433.36 [1] => 433.36 [2] => 433.36 [3] => 433.36 [4] => 433.36 [5] =&g...
asked by 23.09.2015 / 22:10
1
answer

Send E-mail - Wamp and CodeIginiter

I'm trying to send the email via localhost through codeiginiter. Inside my libraries folder, I created a folder "PHPMailer" to put the PHPMailer files. You are not sending the email, you are giving the following error: 2015-09-24 16:53:47 CLIE...
asked by 24.09.2015 / 19:16
1
answer

Autocomplete: JSON + PHP

With the codes below my output that comes after typing "Al" is only "Albania", and it comes duplicated in autocomplete. The result that comes in the chrome console is: > {"0":"Albania","country_name":"Albania"} When I run the query in th...
asked by 25.09.2015 / 04:42
2
answers

Calculate hours in PHP?

I'm developing an electronic dot in PHP and would like to know how to do the two-hour Cachulo, one of which is negative, for example: Day 1: -05: 00: 00 Hours day 2: 08:00:00 How would you do the two-hour bill to get the balance of hour...
asked by 07.07.2015 / 23:32
2
answers

jQuery inserts new rows in the form. How to populate them automatically?

I have a script that automatically adds lines to a form. For this I use jQuery. At each click of a button, jQuey creates a new line in the form to fill in new data. I need a field populated with information based on another field. For example...
asked by 08.07.2015 / 19:04
2
answers

Check if a link is active or broken [duplicate]

I would like to know how I can use PHP to check if the link of download servers like Mega, Google, Filehero among others are active if they are not presenting the result of link offline . In this case, this is offline , , how can I...
asked by 02.06.2015 / 17:12
1
answer

Problem with sending posts via Ajax

I am creating a chat with websocket , when I send a message it saves the message in the database. This is the example of how it sends the message post ButtheproblemiswhenIsendajavascriptfunction(I'mtryingtodeletejavascriptinjectionininputd...
asked by 07.06.2015 / 04:59
3
answers

How to avoid duplicate registration in a php form

I would like examples of how to avoid duplicate email if a user attempts to make multiple registrations. <form action="processar.php" method="POST"> <input type="text" name="nome"> <input type="email" name="email"&g...
asked by 02.06.2015 / 21:46
3
answers

Why does the php string sometimes return instead of some accented letters? [duplicate]

I asked a question about coding problem and json_encode of PHP. In order not to generate a very broad question, I decided to ask this question separately. Why does PHP sometimes return the � character in the middle of a string co...
asked by 09.10.2015 / 14:43
2
answers

Autoload of Models in Laravel 5.1

Good evening I wonder if in Laravel 5.1 there is a way to do autoload, both in Models and Controllers? In Laravel 4 to create an instance of a Model, simply call the Model, like this: $user = new User(); But from what I noticed in Laravel 5...
asked by 16.09.2015 / 00:16