Old 10-17-2005   #1 (permalink)
fRe3zE
Guest
 

Posts: n/a

Exclamation making a installer.php

hey.

I need some help here. I know how to install tables and other stuff manually in phpmyadmin if I wanted to create a database, or a table or whatever.

My question is how do I make like an install.php or somthing so that I can insert the data into a table that I already made? like so people put the username/pass/database name in.. and click submit.. then it auto makes the db and inserts a ready made sql file into the db they have just made using the installer.php, If someone can please give me some source of a allready done installer on how to do this.. i would be much happy! thanks

Peace /fRe3zE
 
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 10-19-2005   #2 (permalink)
Registered User
 
scrowler's Avatar
 
Snake Champion!
Join Date: Feb 2004
Location: New Zealand
Posts: 590
Images: 7

Send a message via MSN to scrowler
take an sql dump of your database and save it to a file:
Code:
<?php

if(isset($_POST["do"])){

mysql_connect($_POST["host"], $_POST["user"], $_POST["pass"]);
mysql_select_db($_POST["db"]);

$fp = fopen( "mysqldump.sql", "r" );
$sql = fread($fp, filesize("mysqldump.sql"));

mysql_query($sql) or die(mysql_error());

echo 'done';

} else {

?><form action="<?php echo $_SERVER["PHP_SELF"] ?>" method="post">
<p><input type="text" name="host" value="localhost" /></p>
<p><input type="text" name="user" vaue="username" /></p>
<p><input type="password" name="pass" value="password" /></p>
<p><input type="text" name="db" value="database name" /></p>
<input type="submit" name="go" value="install" /></p>
</form><?php

}

?>
__________________
BioRUST Tutorials - the birthplace
scrowler is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Making A travel map... mary Adobe Photoshop 1 12-13-2007 05:36 AM
How would I go about making this? iwavethegrain Adobe Photoshop 9 08-27-2007 12:35 PM
Making Use of Resources Man1c M0g Announcements 2 07-16-2006 10:22 PM
A Comic I'm Making Andantonius General Discussions 18 02-25-2006 11:32 PM
W.I.P - We Are Making Out Future Nyo Showrooms & Works In Progress 9 11-21-2005 08:53 AM


All times are GMT +1. The time now is 12:29 PM.

Powered by vBulletin Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.2

Design & Content © BioRUST 2008 :: PRIVACY STATEMENT :: LEGAL INFORMATION :: ADVERTISING MEDIA KIT