I think you will have to open a file on the server with a .php extension and save the variable data in that file. Then redirect the browser to get the page you just created. Be sure to look up these functions to be sure of the syntax.
$handle= fopen("temp.php","r");
fputs($handle,$sql_string . "\r\n");
fclose($handle);
echo "<script>self.location = 'temp.php';</script>";
exit;