mysql_query(CREATE TABLE $tablename( '.
'cid INT NOT NULL AUTO_INCREMENT, '.
'cname VARCHAR(20) NOT NULL, '.
'cemail VARCHAR(50) NOT NULL, '.
'csubject VARCHAR(30) NOT NULL, '.
'cmessage TEXT NOT NULL, '.
'PRIMARY KEY(cid))';
Is wrong, you need a closing bracket and some enclosing quotes.
And unless your using register globas, which you shouldn't be, then $tablename in your network_results.php file should be
$_POST['tablename']