syntax error, unexpected 'mysql_connect' (T_STRING) [closed]-Collection of common programming errors

$mysql_db = 'socialnetwork'
mysql_connect($mysql_host, $mysql_user, $mysql_pass or die("Couldn't Connect") ;
echo 'Connected!'

should be

$mysql_db = 'socialnetwork';
                           ^
mysql_connect($mysql_host, $mysql_user, $mysql_pass) or die("Couldn't Connect") ;
                                                   ^
echo 'Connected!';
                 ^

FYI, you shouldn’t use mysql_* functions in new code. They are no longer maintained and are officially deprecated. See the red box? Learn about prepared statements instead, and use PDO or MySQLi – this article will help you decide which. If you choose PDO, here is a good tutorial.