$result = mysql_query("SELECT post,replier FROM book1");
while($row = mysql_fetch_array($result))
{
$replier = $row['replier'];
$some = $row['post'];
$wors = strip_tags($some);
$query = "INSERT INTO words VALUES('$wors','$replier')";
$up= mysql_query($query);
}
i have to take data from database strip html and put it in another databse
however with the above code only half the data is getting stored in the 2nd database,although when i display all records are displayed from 1st db.
whats wrong here?
You have auto-SQL injection. If some of the HTML stored in first DB contain quotes, it will break the next query. So, escape the values!