How do I pass text data to json request

0 favourites
  • 2 posts
From the Asset Store
OpenAI TTS
$10 USD
Text-to-Speech plugin.Allows your Construct 3 project to convert written text into spoken words
  • 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'];

    }

    }

    }

    ?>

    "

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Nevermind guys, i figured it out. Thanks.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)