ccrevcypsys Posted December 18, 2007 Share Posted December 18, 2007 Hello i now have a question to anyone out there that is good at php and mysql. Here's the query: I need to be able to download the database files to my local host desktop from my admin page. I know the where the files are i was just wondering if this was possible. If so what is the best way to do this. This is what i have so far. I am working off of my local host just for now until i finish the back end code. I have an if statement that should tell me that if those files exist it will say Go Offline and if not then it will say go live. if(file_exists("C:\xampp\mysql\data\nnds\courses.frm") && file_exists("C:\xampp\mysql\data\nnds\courses.MYD") && file_exists("C:\xampp\mysql\data\nnds\courses.MYI") && file_exists("C:\xampp\mysql\data\nnds\diary.frm") && file_exists("C:\xampp\mysql\data\nnds\diary.MYD") && file_exists("C:\xampp\mysql\data\nnds\diary.MYI") && file_exists("C:\xampp\mysql\data\nnds\events.frm") && file_exists("C:\xampp\mysql\data\nnds\events.MYD") && file_exists("C:\xampp\mysql\data\nnds\events.MYI") && file_exists("C:\xampp\mysql\data\nnds\newsletter.frm") && file_exists("C:\xampp\mysql\data\nnds\newsletter.MYD") && file_exists("C:\xampp\mysql\data\nnds\newsletter.MYI") && file_exists("C:\xampp\mysql\data\nnds\office_address_list.frm") && file_exists("C:\xampp\mysql\data\nnds\office_address_list.MYD") && file_exists("C:\xampp\mysql\data\nnds\office_address_list.MYI") && file_exists("C:\xampp\mysql\data\nnds\oncall.frm") && file_exists("C:\xampp\mysql\data\nnds\oncall.MYD") && file_exists("C:\xampp\mysql\data\nnds\oncall.MYI")){ ?><a href="index.php?dl=db">Go Offline</a><?php }else{ ?> <a href="">Go Live</a> <?php } ?></li> But the problem is that this doesnt work how i thought it would. see im codeing for a real idiot. She wont be able to go on phpmyadmin and download it herself (u know csv or w/e) but ne way is this possible? Quote Link to comment Share on other sites More sharing options...
papaface Posted December 18, 2007 Share Posted December 18, 2007 Hello i now have a question to anyone out there that is good at php and mysql. Here's the query: I need to be able to download the database files to my local host desktop from my admin page. I know the where the files are i was just wondering if this was possible. If so what is the best way to do this. This is what i have so far. I am working off of my local host just for now until i finish the back end code. I have an if statement that should tell me that if those files exist it will say Go Offline and if not then it will say go live. if(file_exists("C:\xampp\mysql\data\nnds\courses.frm") && file_exists("C:\xampp\mysql\data\nnds\courses.MYD") && file_exists("C:\xampp\mysql\data\nnds\courses.MYI") && file_exists("C:\xampp\mysql\data\nnds\diary.frm") && file_exists("C:\xampp\mysql\data\nnds\diary.MYD") && file_exists("C:\xampp\mysql\data\nnds\diary.MYI") && file_exists("C:\xampp\mysql\data\nnds\events.frm") && file_exists("C:\xampp\mysql\data\nnds\events.MYD") && file_exists("C:\xampp\mysql\data\nnds\events.MYI") && file_exists("C:\xampp\mysql\data\nnds\newsletter.frm") && file_exists("C:\xampp\mysql\data\nnds\newsletter.MYD") && file_exists("C:\xampp\mysql\data\nnds\newsletter.MYI") && file_exists("C:\xampp\mysql\data\nnds\office_address_list.frm") && file_exists("C:\xampp\mysql\data\nnds\office_address_list.MYD") && file_exists("C:\xampp\mysql\data\nnds\office_address_list.MYI") && file_exists("C:\xampp\mysql\data\nnds\oncall.frm") && file_exists("C:\xampp\mysql\data\nnds\oncall.MYD") && file_exists("C:\xampp\mysql\data\nnds\oncall.MYI")){ ?><a href="index.php?dl=db">Go Offline</a><?php }else{ ?> <a href="">Go Live</a> <?php } ?></li> But the problem is that this doesnt work how i thought it would. see im codeing for a real idiot. She wont be able to go on phpmyadmin and download it herself (u know csv or w/e) but ne way is this possible? Won't work. PHP is server side. Quote Link to comment Share on other sites More sharing options...
ccrevcypsys Posted December 18, 2007 Author Share Posted December 18, 2007 ok so how would i get that to work? or can it even work... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.