PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
First, you are only returning 1 row from the result set with $rowresult=mysql_fetch_array($resultsql). You need this in a loop and do your inserts in the loop. Second, $Values isn't correct, you need VALUES. There's probably a better way to do this. I'll check.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
thefarhan wrote:Thank you -Shawn , You have solved my problem.
The "better way to do it" that he mentioned is what rhecker posted. Your SELECT+INSERT process right now is a bad idea.
I agree.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.