How do I pass text data to json request

Get help using Construct 2

Post » Sun May 01, 2016 7:20 pm

Message: OrlanRod can only post plain text URLS until they have 500 rep. 1 URLS modified. Why?
After isolating the problem, i found that on the php side, $_GET['$fname'] is not grabbing the information from the json request action. I tested the php by placing the username directly into the variable, and that does work, so i do know that it is grabbing the database. This is how the json looks

"
http://domain.com/log.php?fname='"&myUser&"'&fpass='"&myPass&"'"
"

This is how the php looks
"
<?php
header('Access-Control-Allow-Origin: *');
error_reporting(0);
require 'connection.php';

$username = $_GET[$fname];
$password = $_GET[$fpass];

$safeuser = $db->real_escape_string($username);

if($result = $db->query("SELECT * FROM `members` WHERE username='".$username."'")){
if ($count = $result->num_rows){

while($row = $result->fetch_assoc()){
echo $row['id'];
}

}
}


?>

"
B
20
S
1
Posts: 10
Reputation: 786

Post » Sun May 01, 2016 9:36 pm

Nevermind guys, i figured it out. Thanks.
B
20
S
1
Posts: 10
Reputation: 786


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 11 guests