This is a big one!!!!!

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Locked
liquidchild
Forum Newbie
Posts: 9
Joined: Sun Nov 03, 2002 6:25 am

This is a big one!!!!!

Post by liquidchild »

I am trying to create a login script and have the following files (so far)

login.php, mysqlconnect.php, mysqlproperties, and an error logging file.

some of login.php

session_start();

include( "../database/connectionProperties/MysqlProperties.php" );
include( "../database/MysqlConnect.php" );

$mysql_prop = new MysqlProperties;
$mysql_conn = new MysqlConnect;
$mysql_conn->setProperties( $mysql_prop->getHost(), $mysql_prop->getUser, $mysql_prop->getPassword );
$mysql_conn->printProperties();

I wanted to have this in a class but it does not let me do stuff like
class login
{
var $mysql_conn = new MysqlConnect (complains about the new );
}

i have a setprop method in mysql connect as shown:
/** Set the database connection properties **/
function setProperties( $mysql_host, $mysql_user, $mysql_password )
{
$this->_mysql_host = $mysql_host;
$this->_mysql_user = $mysql_user;
$this->_mysql_password = $mysql_password;
}

with the props taken from the mysql prop file. however it does not seem to be creating new instances of mysqlconnect or mysqlprop, as when i try to echo the variables it just appears blank, ANY help would be gratefully appreciated! Thanks in advance.
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Please don't cross post - choose the most relevant forum and post your question there.

Anybody wishing to help please go here:
viewtopic.php?t=5712

Mac
Locked