single config file for two+ pages...<

windows

Guest
Hey guys, I just finally got a good simple
PHP/MySQL CMS/Weblog script to work after reading a good
tutorial on the basics of it;

Anyways, I've modified it so it stores more info
(such as author name/email), the way its displayed is different, etc.

And I'm possibly going to bundle this, as a free
Download off my site, as well as give it to some of my friends,
whom have expressed some interest into it.

Now, the config.php and tossing it into each file
needing the MySQL info, is pretty much down;
but now I'm on the install.php part, which will run the
SQL to create the table & colums, but I get this problem:

Parse error: parse error, unexpected T_STRING in c:\program files\apache group\apache\htdocs\kcms\install.php on line 5

here's the coding for both config.php & install.php:

config.php - the code
<?php
$db_server = "localhost"
$db_user = "root"
$db_pass = "password"
$db_name = "database"
?>

install.php - the code
<?php
require('config.php');
mysql_connect("$db_server", "$db_user", "$db_pass");
mysql_select_db("$db_name");
$query = CREATE TABLE kcms (
entrydate TIMESTAMP PRIMARY KEY,
entryauthor VARCHAR(100),
entryemail VARCHAR(100),
entrytitle VARCHAR(100),
entrytext TEXT);

if (!$query) {
echo "ERROR!";
} else {
echo "Successful!";
?>

I'm not quiet entirely sure how to "phase"
so-to-say, the SQL part....

Thnkx 4 any/all help :)$query = "CREATE TABLE kcms (
entrydate TIMESTAMP PRIMARY KEY,
entryauthor VARCHAR(100),
entryemail VARCHAR(100),
entrytitle VARCHAR(100),
entrytext TEXT)";that is why you need phpmyadmin working so it will export the table setting and give you the correct query.


$query = mysql_query("CREATE TABLE kcms (
entrydate TIMESTAMP,
entryauthor VARCHAR(100) NOT NULL default '0',
entryemail VARCHAR(100) NOT NULL default '0',
entrytitle VARCHAR(100) NOT NULL default '0',
entrytext TEXT,
PRIMARY KEY (entrydate)
) TYPE=MyISAM;");ah I got phpMyAdmin, but no on my personal comp;
just Dailup + one phone line = no good :(what does dialup have to do with it?bother always uses phone, or parents need it, etc.
so often time by time I'm allowed to dail-up, I've done
forgotten what I needed to do, or simply don't even bother
dailing up, as I'm too tired.

Then of course, rare chances like this, I simply
use the family comp which has cable....
 
Back
Top