Posts by Kevin mtk • 637 points
16 posts
-
3
votes1
answer88
viewsQ: Long Polling Doesn’t Do Timestamp GET
I picked up this example on the blog http://rberaldo.com.br/server-push-long-polling-php-ios/ Server.php <?php header('Content-type: application/json'); require 'pdo.php'; set_time_limit(0);…
-
6
votes2
answers1087
viewsQ: A Mysql query, with`crases` vs without
With aces to query is safer or less? $Query = "Select * from `tabela` WHERE `id` = `1`"; vs $Query = "Select * from tabela WHERE id = 1";
-
1
votes1
answer42
viewsQ: Append Infinite arrays returned from PHP to AJAX
function CheckNewsFeed() { $.ajax({ url: ProcurarPorNovosDados.php, success: function(texto) { *Aqui que está minha dúvida, como fazer o Append de resultados dinâmicos retornado pelo PHP?*…
-
3
votes1
answer1005
viewsQ: How to describe the database of a chat with multiple people
That it’s easy to make a conversation between two people, I know, but then someone can quote an example of how to make a group conversation? With an unlimited number of people. Conversation between…
-
2
votes1
answer396
viewsQ: Insert an Array, regardless of the amount of $_POST
For example, a person adds many Images to be published. She can add 4 images as well as can add 10,15,1,3 and etc. How would the QUERY? Form POST array: array ( [IMG1] =>…
-
0
votes0
answers39
viewsQ: How to make Jquery run on all pages simultaneously
For example: with 2 facebook pages open, open some conversation with a friend on 1 of the pages, go to 2 page and you will see that the window is open there too, how is this possible? How is it…
-
0
votes1
answer237
viewsQ: GET image/gif with jQuery
I tried this but the Google Chrome Developers utility recognizes dataType as xhr $(document).ready(function() { $.ajax({ type: "GET", url: "/img/img.gif", dataType: "image/gif", cache: true }); });…
-
9
votes3
answers260
viewsQ: Create a real "loading..."?
I’ve been researching some legal effects for a status of "Loading..." But I realized that on all the sites, they use timeout so that the animation goes in and out of the page, being then, just a…
-
12
votes2
answers1823
viewsQ: Can I use Empty and isset in a variable?
Follow an example: if(isset($_POST['nome']) && !empty($_POST['nome'])) { session_start(); $_SESSION['nome'] = $_POST['nome']; } See demonstração If I can’t use this, what would be…
-
3
votes1
answer605
viewsQ: What is the difference between long Lling and normal ajax?
I’m trying to understand more about long Polling to "manipulate" a site in real time, I’ve seen some videos and I’m thinking so far: Let’s say I have an old date that’s in sql and I do an echo on…
-
1
votes3
answers600
viewsQ: Can anyone cite examples for a user’s status? (online & offline)
So I was thinking of picking up the user table where the status = online, I put by default "Offline" , but I know that when the user shuts down the computer without clicking Log out, the table will…
-
5
votes3
answers2046
viewsQ: Post a comment and then display without refresh
Updated 5 Good morning guys, I’m trying to create a comment system like http://demo.hazzardweb.net/comments/ below we have the javascript code that sends the form and then adds the comment, it is…
-
2
votes1
answer1327
viewsQ: How to "preg_match" only numbers?
My attempt, a failure: $post_id = preg_match("/^[0-9]+$/", $_POST['post_id']); I tried to be a user who changed the id of the post to for example: post_id="43223646", However, when the data is…
-
0
votes1
answer67
viewsQ: Comment for each post id without multiplication of the same
First see the image of my database (the link arrows from one table to another are the inner join's): http://prntscr.com/6wjl4h Current query: "SELECT question.*, questioncomments.*, login.* FROM…
-
0
votes2
answers864
viewsA: Login to facebook using custom button
Hello Jonathan Sales this helps you? xmlns:*PREFIX*="http://schemas.android.com/apk/res-auto" <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"…
-
2
votes1
answer98
viewsQ: I switched from mysqli to PDO and I can’t get Row
In my mysqli it was easy $_SESSION['userphoto'] = $row['userphoto']; How to make it work on PDO ? Connectionlogin.php session_start(); $stmt->bindParam(':email', $_POST['email']);…