I am using this mysql command to remove extra character from string. Command is below mysql_real_escape_string($text);
The above command is working completely in local server but it is not working on live server, it gives error like "mysql connection not open".
mysql_real_escape_string($text) command need connection with database. So, you need to open connection before this command and then close the connection after it.
your code is: