Questions tagged as 'php'

1
answer

How to work a secure session in PHP using cookies so that the session does not expire when closing the browser?

In PHP, I usually work with restricted user authentication using the $_SESSION variable, however I want to change this method to cookies so that the session does not close when closing the browser. On sites like Google and Facebook, the u...
asked by 26.02.2014 / 21:03
1
answer

Problem with subfolders and url rewrite with Laravel

I'm trying to make Laravel 4 run in a subdirectory, using .htaccess to be able to rewrite the url to the public folder Example: C:\xammp\htdocs\laravel4 .htaccess is rewriting C:\xammp\htdocs\laravel4 to C...
asked by 11.12.2014 / 17:46
1
answer

WebRTC JavaScript with Java / PHP server

Does anyone have any examples or documentation, how to create a WebRTC client (browser), using a Java or PHP server to make a handshake between them? I can not use node.js, and the documentation I find is getting some information from the nod...
asked by 10.03.2014 / 19:28
4
answers

Create infinite menu with PHP + CSS + JS

I have a menu (vertical) that works as an accordion, this in turn, needs to open the "children" unlimited (my problem is solved, and I can not), since it will be a menu for a store. p> As follows: -CATEGORIA PAI - CATEGORIA FILHO - CATEG...
asked by 28.02.2014 / 15:43
1
answer

Header can not find the last destination

I'm working on a project and the header function can not find the destination passed to it. I have the following folder structure: Inagivenform,Ipassactionto:<formmethod="post" action="index.php?pagina=../controller/controllerCatego...
asked by 04.05.2015 / 00:21
1
answer

Change a Select mysql to a Select PDO

I have a Select from sources listed in a table, and I currently use this code to list them so that the user can choose the desired font. <select name="tipo_font_end"> <?php $select = mysql_query("SELECT * FROM fontes");...
asked by 09.05.2015 / 20:16
1
answer

Activity has Leaked window Android

I make a connection to MySQL and it returns me a JSON that I play in a list of products. When I click on any of these items it picks up the ID (called PID in the code) of the product and sends it to another Acitivity. In this other Activity the...
asked by 12.05.2015 / 18:37
1
answer

Use PDO prepared statements in function

I've been reading about preventing sql injections and seen using prepared statements might help. I have the following function in a class for crud that I have developed: public function inserir($tabela, $campos, $dados) { try {...
asked by 18.04.2015 / 16:50
3
answers

How to update PHP timezone with javascript using the Date.getTimezoneOffset function?

I'm getting the TMZ end user with this code: TMZ = new Date().getTimezoneOffset() For me it returns 180 and this number I send to the server, so that it adjusts the time of it with mine, but the date_default_timezone_set...
asked by 19.04.2015 / 16:42
1
answer

PHP session does not work

I have a system that I use to validate the session. For validation use the code below: <?php session_start(); public function validaUsuarios($loginUsuario,$senhaUsuario){ ....... $_SESSION['logado'] = true; header('lo...
asked by 24.04.2015 / 14:28