Jump to content

Archived

This topic is now archived and is closed to further replies.

redarrow

install.php help

Recommended Posts

if i call this script install.php and goto that url will then i get the installed database information.

trying to learn how to install database entry via php.

I wont to learn the step by step proceger any links cheers.

install.php

[code]
CREATE TABLE `members` (
  `id` MEDIUMINT(8) UNSIGNED NOT NULL AUTO_INCREMENT,
  `Name` varchar(30) NOT NULL default '',
  `address` varchar(30) NOT NULL default '',
  PRIMARY KEY  (`id`)
) TYPE=MyISAM AUTO_INCREMENT=1
[/code]

Share this post


Link to post
Share on other sites
Why don't you use something like that:

sql.txt - stores queries.
install.php - executes the queries:

[code]<?php

// Connect to db and stuff

$query = file_get_contents('sql.txt');
mysql_query($query)

?>[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.