/    Sign up×
Community /Pin to ProfileBookmark

Install script errors

Aiyaiyai. Ok. What the heck is wrong with this? Bet you 100 bux it’s a simple thing!

Parse error: parse error in /home/www/netgeekz.goldeye.info/member
system/install.php on line 21

[code=php]<?php

$sitename = $_POST[‘sitename’];
$dbhost = $_POST[‘dbhost’];
$dbname = $_POST[‘dbname’];
$dbuser = $_POST[‘dbuser’];
$dbpasswd = $_POST[‘dbpasswd’];
$url = $_POST[‘url’];
$ename = $_POST[‘ename’];
$aname = $_POST[‘aname’];
$apass = md5($_POST[‘apass’]);
$aemail = $_POST[‘aemail’];

/* Database Stuff, do not modify below this line */
$connection = mysql_pconnect(“$dbhost”,”$dbuser”,”$dbpasswd”)
or die (“Couldn’t connect to server.”);

$db = mysql_select_db(“$dbname”, $connection)
or die(“Couldn’t select database.”);

$sql = CREATE TABLE users (
userid int(25) NOT NULL auto_increment,
email_address varchar(25) NOT NULL default ”,
username varchar(25) NOT NULL default ”,
password varchar(255) NOT NULL default ”,
info text NOT NULL,
user_level varchar(16) NOT NULL default ‘0’,
signup_date datetime NOT NULL default ‘0000-00-00 00:00:00’,
last_login datetime NOT NULL default ‘0000-00-00 00:00:00’,
activated enum(‘0′,’1’) NOT NULL default ‘0’,
PRIMARY KEY (userid)
) TYPE=MyISAM COMMENT=’Membership Information’;
mysql_query($sql) or die(mysql_error());

$sql2 = mysql_query(“INSERT INTO users (email_address, username, password, signup_date)
VALUES(‘$aemail’, ‘$aname’, ‘$apass’, now())”) or die (mysql_error());
mysql_query($sql2) or die(mysql_error());

//Write config info to config.php file
$fcontents = implode (”, file (‘config.php’));
$fcontents = ereg_replace(“HOST”,”$dbhost”,$fcontents);
$fcontents = ereg_replace(“DBNAME”,”$dbname”,$fcontents);
$fcontents = ereg_replace(“DB USER”,”$dbuser”,$fcontents);
$fcontents = ereg_replace(“DB PASS”,”$dbpass”,$fcontents);
$fcontents = ereg_replace(“NAME”,”$sitename”,$fcontents);
$fcontents = ereg_replace(“SITEURL”,”$url”,$fcontents);
$fcontents = ereg_replace(“ADMIN EMAIL”,”$adminemail”,$fcontents);
$fcontents = ereg_replace(“SITE EMAIL NAME”,”$ename”,$fcontents);
?>[/code]

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@ScleppelMar 19.2005 — Maybe this
[code=php]$sql = CREATE TABLE users (
userid int(25) NOT NULL auto_increment,
email_address varchar(25) NOT NULL default '',
username varchar(25) NOT NULL default '',
password varchar(255) NOT NULL default '',
info text NOT NULL,
user_level varchar(16) NOT NULL default '0',
signup_date datetime NOT NULL default '0000-00-00 00:00:00',
last_login datetime NOT NULL default '0000-00-00 00:00:00',
activated enum('0','1') NOT NULL default '0',
PRIMARY KEY (userid)
) TYPE=MyISAM COMMENT='Membership Information';
mysql_query($sql) or die(mysql_error()); [/code]

should be this
[code=php]$sql = "CREATE TABLE users (
userid int(25) NOT NULL auto_increment,
email_address varchar(25) NOT NULL default '',
username varchar(25) NOT NULL default '',
password varchar(255) NOT NULL default '',
info text NOT NULL,
user_level varchar(16) NOT NULL default '0',
signup_date datetime NOT NULL default '0000-00-00 00:00:00',
last_login datetime NOT NULL default '0000-00-00 00:00:00',
activated enum('0','1') NOT NULL default '0',
PRIMARY KEY (userid)
) TYPE=MyISAM COMMENT='Membership Information'";
[/code]
Copy linkTweet thisAlerts:
@neenach2002authorMar 19.2005 — I KNEW it was something simple...;_;
×

Success!

Help @neenach2002 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...