Moving the code like you suggested results in a blank page, so that method won't work I guess
I don't see how it could do that, you did remove the temp echo & exit ?
Anyway, from memory, in the original code posted above, try changing
PHP Code:
if (isset($_GET['do'])) {
$do = $_GET['do'];
}
to
PHP Code:
if (isset($_REQUEST['do'])) {
$do = $_REQUEST['do'];
}
Also, I notice that in your conversion from the original, you have changed all the query_first to query_read - (except one where you just have query) - you don't need to do this and should probably change them back as you only need the first result.