admin管理员组

文章数量:1386846

Trying to $_GET two variable from a URL generated by a HTML5 Construct 2 embedded game.

.php?name=NAME_HERE&score=1337

Using

<?php

/** Sets up the WordPress Environment. */
require_once( $_SERVER['DOCUMENT_ROOT'] . '/wp-config.php');

if(isset($_GET['name']) && isset($_GET['score'])){

//Lightly sanitize the GET's to prevent SQL injections and possible XSS attacks
$name = strip_tags(mysql_real_escape_string($_GET['name']));
$score = strip_tags(mysql_real_escape_string($_GET['score']));

I have also added the following to the Game index page, which allows me to display WP user ID and so on

/** Sets up the WordPress Environment. */
require_once( $_SERVER['DOCUMENT_ROOT'] . '/wp-config.php');

global $wpdb;

However, I don't seem to be getting anything from the URL regarding the Scores and Name variables

本文标签: Can39t GET Variable from AJAX URL