How can the load() function in jQuery be used to pass additional GET data to a PHP document?
To pass additional GET data to a PHP document using the load() function in jQuery, you can append the data to the URL in the load() function call. This allows you to send extra parameters to the PHP document which can be accessed using the $_GET superglobal in PHP.
<?php
// PHP document receiving additional GET data
if(isset($_GET['param1']) && isset($_GET['param2'])){
$param1 = $_GET['param1'];
$param2 = $_GET['param2'];
// Do something with the parameters
echo "Parameter 1: " . $param1 . "<br>";
echo "Parameter 2: " . $param2;
}
?>