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
版权声明:本文标题:Can't GET Variable from AJAX URL 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744532999a2611146.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论