Questions tagged as 'php'

1
answer

Convert MySQL code to MySQLi [closed]

3 Errors are presented:    Notice: Undefined variable: save in C: \ xampp \ htdocs \ index.php on line 6    Warning: mysql_num_rows () expects parameter 1 to be resource, boolean given in C: \ xampp \ htdocs \ index.php on line 133    No...
asked by 24.10.2015 / 17:57
2
answers

Write to two different tables using the same View

I'm doing a supplier registration, and I need to record it in one table and its address in another. I use a single view vendors.blade to fill in all the data. How can I separate this data to write them to their respective tables? Suppliers...
asked by 07.09.2015 / 00:22
2
answers

Turning an PHP variable into an array

I have a JavaScript variable that is a string "13:00:00" , however I would like to pass it to PHP and slice it into an array, separating it with ":" but the explode function does not work with the following code : <scrip...
asked by 15.09.2015 / 02:11
2
answers

Login PHP and MySql generating error mysqli_fetch_array ()

Good morning! I have the following code to log in to the system: <?php require_once('conexao.php'); // FETCH DATA FROM FORM USING METHOD POST // IF BUTTON NAME "LOGIN" IS SET if (isset($_POST['login'])) { // FETCH DATA FROM INPUT...
asked by 01.09.2015 / 16:21
1
answer

Change javascript array keys

My javaScript function send my data by hidden input to PHP like this: $('<input/>').attr("type", "hidden").attr("name", "produto"+ contador + "[]").val(formData).appendTo(row); $('<input/>').attr("type", "hidden").attr("name",...
asked by 09.08.2015 / 03:07
1
answer

Generate token from string and check generated token

Basically, I need something that works similar to $hash = Hash::make('string') and Hash::check('string', $hash) but does not produce a result as large as (60 characters).    or $hash = password_hash('string') and passw...
asked by 14.08.2015 / 19:08
2
answers

Extract key pair / value from a querystring

I have this code where I get the value of a post and ajax. $string = 'nome=Alexandre+Sousa&cpf=0000000000000&email=sousa.akira%40gmail.com&site=www.uniaomaker.com.br'; $dados = explode('&',$string); $total = count($dados); $a...
asked by 15.08.2015 / 06:02
2
answers

How to publish multiple Laravel applications on Shared Server?

I have two independent applications made in Laravel I would like to host them on the same server, in separate directories. I searched extensively in the documentation and forums, and managed to make only one application work correctly, howeve...
asked by 19.02.2016 / 21:23
2
answers

What jQuery event do I use to query the database?

jQuery(function($){ // Chamando as funções $('#busca-cidades').keyup(function(){ ... I am doing a query in the database and returning this query formatted with html / css and the query is in WordPress SQL. So far nothing very differen...
asked by 13.07.2015 / 00:25
1
answer

Why should I use File :: copy, if PHP already exists copy?

I'm using Laravel on various projects I use. I needed to copy a particular file from one location to another, and I saw in the Laravel documentation that I should use File::copy() . Out of curiosity, as I always do, I decide...
asked by 06.07.2015 / 18:34