PDA

View Full Version : php error


pethon
11-06-2006, 07:12 PM
Parse error: syntax error, unexpected T_VARIABLE in /home/www/blahblahmydomain.com/php_classes/class_registration.php on line 4

which is this line

var $username = $_POST['txt_Username'];

pethon
11-06-2006, 07:12 PM
The full code is this


<?php

class Registration {

function CheckUsername() {
var $username = $_POST['txt_Username'];
}
}

?>

davidj
11-06-2006, 09:12 PM
would $_POST['txt_Username'] be available inside a class / function ??

im not sure it would

davidj
11-06-2006, 09:19 PM
also

why are you coding this OO

what are your requirements and why did you choose this method