SQl connection to XAMP
mysql_* functions


officially deprecated as of PHP 5.5 (released June 2013).
removed entirely as of PHP 7.0 (released December 2015)


So switch to 
mysqli or pdo and use always prepared statements with parameters because of sql injections

see api comparison