Questions tagged as 'php'

1
answer

Using PHP in the terminal, xampp

I'm trying to use PHP through the terminal, but I can not, when I type which php it returns /usr/bin/php so I can not run PHP files, so it can not find the files. I'm using XAMPP for MAC     
asked by 11.11.2015 / 00:19
3
answers

How do I populate a $ scope (angular) with get.Json (jquery)?

I have a PHP application and use $.getJSON of jQuery to fetch data and thus submit it to my user. I would like to populate a table using Angular. How do I fill a $scope with the response of $.getJSON ? Code sample below (w...
asked by 27.02.2014 / 14:23
2
answers

Variable value changing according to a select

I have the following problem, guys: I have a variable $soma_produtos = 0 (Get bank values through a foreach) Getting the foreach data would look something like this: $soma_produtos += $produto->getPreco(); Other $des...
asked by 14.11.2015 / 17:21
2
answers

Return calculation for textarea

I have a PHP page with 2 <textarea> forms, I need to do some calculations on the first <textarea> with PHP as soon as the user clicks on the submit button and returns the result for 2 <textarea> that is...
asked by 30.01.2015 / 19:11
3
answers

Real-time dynamic search

In the company I work with, we will implement a system in which the Back-end will be PHP and the database will be CACHE (Intersystem). The database is on a different server from where the system will be implemented in PHP, it happens that all...
asked by 06.02.2015 / 03:15
3
answers

Array assignment in variable

Is there a proper way to do this highlighted code snippet? $numeros = range(0, 9); shuffle($numeros); $id = array_slice($numeros, 1, 9); $mult = $id[0].$id[1].$id[2].$id[3].$id[4].$id[5].$id[6].$id[7].$id[8]; echo $mult; In other words, m...
asked by 02.02.2015 / 23:24
1
answer

Friendly URL does not load content

Well, I'm here with a problem in the url friendly, I'm doing the routes through the file .htaccess and get the values by $_GET . Only when I enter the url the content is not loaded, always trying to load and nothing. htaccess fil...
asked by 10.02.2015 / 21:57
3
answers

Problem with concatenation of variable

I have a variable in a foreach that takes the id of the record: $id_inscrito = $this->session->userdata('last_id'); I want to store this variable in another: $ids_ = $id_inscrito.'|'.$id_inscrito; Give me the result in...
asked by 04.02.2015 / 22:15
1
answer

You have an error in your SQL syntax;

I've been using this code for a long time now that it came to give this error    Error: Database Select Failed:       You have an error in your SQL syntax; check the manual that   correspond to your MySQL server version for the right syntax...
asked by 26.06.2014 / 14:48
1
answer

Distinguish forms within PHP

There is a way to distinguish forms within PHP, since I want every form to be sent to the same function, which will be responsible for passing $_GET to the proper function that can check the consistency of the form.     
asked by 21.12.2014 / 19:35