$sql_new=$sql1. UNION .$sql2;
This expression gives the following error notice:
Use of undefined constant UNION - assumed 'UNION' in php
$sql_new=$sql1. UNION .$sql2;
This expression gives the following error notice:
Use of undefined constant UNION - assumed 'UNION' in php
$sql_new=$sql1 . " UNION " . $sql2;
you have to put your strings into quotes so that PHP knows it's a string.