Thanks for the replies.
I changed my code to show
$result = mysql_query($query) or die(mysql_error());
and it gave this error
Access denied for user: 'softekso_taskusr@localhost' to database 'softekso_test'
When I create the db softekso_test this is the command I use for privileges
$query ="grant select, insert, update, delete, alter, create, drop on ".$dbname.".*
to softekso_taskusr@localhost identified by 'passgoeshere';";
$result = @mysql_query($query);
SO I went back and granted drop privileges to not only my global_db user but to the user of the DB I am currently using to create the DB and I still get this error.
Not sure what I am doing wrong