Posts by iPrimePortas • 79 points
12 posts
-
0
votes2
answers114
viewsQ: Jquery - include variables in ajax
Before you ask I’ll leave my script: Html </form> <input type="text" id="email"> <input type="password id="senha"> <button>Entrar</button> </form> Jquery var form…
-
1
votes0
answers67
viewsQ: PHP - Split list and print
I’m creating a script for study and I need to split the list into array. So you can be informed in for or foreach. That in each tested account is informed the result on the screen and so on... I’m…
-
0
votes0
answers58
viewsQ: Curl inside is time consuming and troubled
I need to test all user accounts of a db on text area am utilizando the script function informacoes(){ $linhas = explode("\n", $_POST['conta']); $count = count($linhas) -1; for($i=0 ; $i<=…
-
-2
votes1
answer69
viewsQ: Script "more beautiful"
I am using the following code for the User class : <?php class Usuario { public $nome, $email; private $senha; private $mysqli; public function __construct($nome, $email, $senha){ $this->nome…
-
2
votes1
answer124
viewsQ: Class organization
I need to create a system of posts. I’m having a hard time studying class and I’m wondering which of the two ways to use it: class publicarPost {} class excluirPost {} class curtir {} or class Post…
-
1
votes2
answers526
viewsQ: Connect class database
How do I not need to connect to the database every Function in PHP class? I’m trying this way: class Perguntas { public function __construct(){ $mysqli = new mysqli('localhost','root','','game'); }…
phpasked iPrimePortas 79 -
-1
votes1
answer213
viewsQ: PHP - knowing which form was pressed
I need to know which form was pressed. I’m using a get system to differentiate, but the link would be very dirty. My code: $mysqli = new mysqli("localhost","root","","escritor"); if($result =…
phpasked iPrimePortas 79 -
0
votes3
answers687
viewsA: Update with PHP variable
Forgot to close the quotes your code: $consulta2 = $conexao->escape_string("UPDATE host SET uptimeHost='".$hora."', avisoHost=0 WHERE idHost='".$idHost); as it should be: $consulta2 =…
-
0
votes3
answers687
viewsA: Update with PHP variable
$hora = date('H:i:s'); $idHost = 1; $conexao = mysqli_connect("localhost","root","","banco"); $sql = "update host set uptimeHost='$hora',avisoHost='0' where idHost='$idHost'"; $query =…
-
1
votes1
answer117
viewsQ: What is the best way to post comments?
How can I organize a Mysql comment system An idea would be: id_post id_comentario id_user comentario Only it would take up a lot of space and it wouldn’t be so fast to process 2000 comments from…
-
0
votes0
answers464
viewsQ: PHP - Check which page is running
I have a config.php file, all the other files on the site include it. I’m having trouble checking which page config.php is currently running. Only example I found was using is_page but failed…
phpasked iPrimePortas 79 -
0
votes2
answers402
viewsQ: PHP - array shuffle
I’m programming a page of feed on news in PHP. I ask for your help to help me shuffle the array $tagsArray for posts not always stay in the same order. Thank you in advance! Code: <?php $conexao…