-
October 30th, 2010, 10:50 PM
#1
php error, plz help
Hello all,
i am new to php and need help with my code.
Code:
<?php
class vars{
function get($filed_name){
$data = $_GET[$filed_name];
if(!$data) return 0;
return $data;
}
}
?>
<?php
$clss = new vars();
header('Content-Type: text/html; charset=utf-8');
define("BaseSite", "http://localhost:3000/");
?>
<?php
if (!$_GET['edit'] & !$_GET['id']) {
?>
<html>
.....
</html>
<?php } else {
if($_GET['edit'] == 1 & $_GET['id'] > 0){
$ID = $vars->get("id");
$update = 1;
?>
<html>
......
</html>
<?php
}
?>
when the BOLD line is calling i get an error:
"php call to a member function get() on a non-object......"
someone can help me please?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|