cdmafra Posted March 18, 2014 Share Posted March 18, 2014 Hello. I have a strange error T_String, because it was not there until I changed my server. I updated my details, but returns: Parse error: syntax error, unexpected T_STRING in /usr/home/motorra/public_html/login/db_connect_close.php on line 4 1. <?php 2. $link = mysql_connect("localhost", "USER", "PASS") 3. // Close connection 4. mysql_close($link); 5. ?> Link to comment https://forums.phpfreaks.com/topic/287059-t_string-error/ Share on other sites More sharing options...
Ch0cu3r Posted March 18, 2014 Share Posted March 18, 2014 You have left off the ; at the end of line 2 $link = mysql_connect("localhost", "USER", "PASS"); // <-- missing semi-colon at end of line NOTE: If you are starting to lean to use MySQL databases with PHP, then I strongly encourage you to not carry on using the standard mysql_* functions. Instead use MySQLi instead. The mysql_* function are deprecated and could so be removed completely from newer versions of PHP. Link to comment https://forums.phpfreaks.com/topic/287059-t_string-error/#findComment-1473004 Share on other sites More sharing options...
cdmafra Posted March 18, 2014 Author Share Posted March 18, 2014 I noted that meanwhile. Many thanks! You have left off the ; at the end of line 2 $link = mysql_connect("localhost", "USER", "PASS"); // <-- missing semi-colon at end of line NOTE: If you are starting to lean to use MySQL databases with PHP, then I strongly encourage you to not carry on using the standard mysql_* functions. Instead use MySQLi instead. The mysql_* function are deprecated and could so be removed completely from newer versions of PHP. Link to comment https://forums.phpfreaks.com/topic/287059-t_string-error/#findComment-1473006 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.