xmlhttp.open("GET", "assets/php/bookingsearch.php?q=" + str, true);
$q=$_GET["q"];
WHERE `name` LIKE '%$q%'
xmlhttp.open("GET", "[[~17]]? &q=" + str, true);
$q=$_GET['q'];
WHERE `name` LIKE "%'.$q.'%"
This question has been answered by BobRay. See the first response.
xmlhttp.open("GET", "[[~17]]?q=" + str, true);
xmlhttp.open("GET", "[[~17]]", true);
xmlhttp.open("GET", "[[~17]]?q=" + str, true);
Failed to load resource: http://www.mysite.com/subfolder/index.php?id=17?q=smit the server responded with a status of 500 (Internal Server Error)which would seem to be the incorrect link, so I changed the AJAX call to
xmlhttp.open("GET", "[[~17]]&q=" + str, true);
http://www.mysite.com/subfolder/index.php?id=17&q=smitwhich seems correct, but still getting a 500 server error.
http://mysite.com/subfolder/index.php?id=17the resource and snippet return all the records in the table as expected.
http://mysite.com/subfolder/index.php?id=17&q=smitI'm redirected to the index page, which I presume is the equivalent of a 404 not found?
# The Friendly URLs part RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]