tags:

views:

63

answers:

1

i want php code to import *.sql file to database and export db to *.sql file without going to phpmyadmin

A: 
exec("mysqldump database -u username -p password  > output.sql");

http://nl2.php.net/manual/en/function.exec.php

http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html

hoppa