Javascript
$("#appendedInputButton").click( function () {
bday = document.getElementById("appendedInputButton").value;
$.get("php/getWiki.php", {
"bday":bday
}, function (data) {
response = data;
})
});
Also tried bday w/o the quotes.
PHP
if (isset($_GET["bday"])) {
var_dump($_GET);
$bday = $_GET["bday"];
echo $bday;
echo "<br>";
...
} else {
echo "error lols."
}
I guess I’m not doing something correctly.
Here is the response outout:
response
"array(1) {
["bday"]=>
string(0) ""
}"
You’re binding the
clickevent to the same input that contains the value, so the first time you click it, there won’t be anything in it to send.(Just posting this as an answer so it’s actually answered ^_^)