0

I followed a tutorial that went like so:

        ajaxRequest.onreadystatechange = function(){
            if(ajaxRequest.readyState == 4){
                //use the value  passed in to return response to correct button
                e = document.getElementById("RB" + number);
                e.value = ajaxRequest.responseText + number;
            }

        }

        ajaxRequest.open("GET", "Reject.php" + number, true);
        ajaxRequest.send(null); 

I need to pass number for a mysql function in Reject.php. However, despite the example working for the tutor, my file wants to append the number onto the reject.php giving me a 404 error. What am I doing wrong? In my Reject.php:

   $ID = $_GET['number'];
4

1 に答える 1

2

You need to pass a querystring, just like any other URL:

"Reject.php?number=" + number
于 2012-04-11T01:11:13.963 に答える