View Single Post
  #1  
Old 08-15-2006, 02:17 PM
gathy gathy is offline
Junior Member
 
Join Date: Aug 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
gathy is on a distinguished road
Exclamation unable to create class

Hi guys,

I'v got a bit of a problem, from what I can see everything is ok. But when I try and create an instance of a class it doesn't do anything.

The below code is ment to check all details and then process it i.e. store the user in the db. but it fails at $reg = new register($username, $password);

The code:

PHP Code:
<?php
$username = $_POST['username'];
$password = $_POST['password'];
$confirmPassword = $_POST['confirmPassword'];

// CHECK IF ALL DETAILS HAVE BEEN PROVIDED
if (!$username) {
errorMessage('Missing username', 'Please enter a username.');
include('templates/registration_form.php');
}
else if (!$password) {
errorMessage('Missing password', 'Please enter a password.');
include('templates/registration_form.php');
}
e -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote
  Webmaster Forums - View Single Post - unable to create class
View Single Post
  #1  
Old 08-15-2006, 02:17 PM
gathy gathy is offline
Junior Member
 
Join Date: Aug 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
gathy is on a distinguished road
Exclamation unable to create class

Hi guys,

I'v got a bit of a problem, from what I can see everything is ok. But when I try and create an instance of a class it doesn't do anything.

The below code is ment to check all details and then process it i.e. store the user in the db. but it fails at $reg = new register($username, $password);

The code:

PHP Code:
<?php
$username = $_POST['username'];
$password = $_POST['password'];
$confirmPassword = $_POST['confirmPassword'];

// CHECK IF ALL DETAILS HAVE BEEN PROVIDED
if (!$username) {
errorMessage('Missing username', 'Please enter a username.');
include('templates/registration_form.php');
}
else if (!$password) {
errorMessage('Missing password', 'Please enter a password.');
include('templates/registration_form.php');
}
e -- This message may have been cut off and the rest will only be shown to members. To become a member, click here --
Reply With Quote