i had 2 databases, one run in my localhost which is offline and another is in server which is online, and what i want is after i insert some data in my localhost offline, i can click a button in my offline which is sync the database and update it on the server database which is online, and anyone of you know how to do it? Im new in php and mysql, hope you all can help, thanks!!
Doing synchronization like this is, I'm sorry to say, not a beginner activity.
If you were more experienced I would recommend things like a transaction table - where you record each action, then replay it on the server (aka slave).
MySQL can also do that automatically see: http://dev.mysql.com/doc/refman/5.0/en/replication.html
But none of it is simple to setup.
If you don't mind deleting and recreating the database fresh each time, then you maybe be able to use mysqldump
to create a full export of your database, then load it on the server.