24.07.2017, 07:19
Try this.
Also, why you have not filled up MYSQL_HOST, MYSQL_USER, MYSQL_DB and MYSQL_PASS in Server1? It's totally unnecessary, remove the whole of Server1.
PHP Code:
handle = mysql_connect(MYSQL_HOST, MYSQL_USER, MYSQL_PASS, MYSQL_DB);
Details for mysql_host, etc:
#if defined Server1
#define MYSQL_HOST ""
#define MYSQL_USER ""
#define MYSQL_PASS " "
#define MYSQL_DB ""
#endif
#if defined Server2
#define MYSQL_HOST "localhost"
#define MYSQL_USER "root"
#define MYSQL_PASS " " // SPACE IF NO PASS
#define MYSQL_DB "testx"
#endif