Old 10-17-2005   #1 (permalink)
Registered User
 
Join Date: Oct 2005
Posts: 1

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
fRe3zE is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 10-19-2005   #2 (permalink)
code anyone?
 
scrowler's Avatar
 
Join Date: Feb 2004
Location: New Zealand
Posts: 590

Send a message via MSN to scrowler Send a message via Skype™ 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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Making a room? killmr Blender 3D 4 01-09-2006 09:00 PM
making moving spotlights LimitLess Flash & Dynamic Media 0 08-06-2005 11:27 PM
Making a single loop .gif play multiple times GoldNetX HTML / PHP / ASP / JS 4 07-25-2005 12:26 PM
Help: Making images links (it isn't what you think...read) kp606-Epsilon Adobe Photoshop 2 07-15-2004 02:14 PM
Flash site making YeYeR00 Flash & Dynamic Media 2 06-14-2004 11:41 PM


All times are GMT +1. The time now is 05:50 PM.
Content Relevant URLs by vBSEO 3.2.0

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