FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » classes in PHP
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
classes in PHP [message #180271] Sun, 03 February 2013 17:04 Go to previous message
Rita Ferreira is currently offline  Rita Ferreira
Messages: 4
Registered: February 2013
Karma:
Junior Member
Hi,
I'm new working with classes in PHP.

I'm trying to make login, and I have a form in html which the action I would like to go to the login function located in a class file called UserControler.php.
My form is in a php file but is not inside a class. I can't call the login function, it always give me error, so I tried to call a file called process.php file where there I call the login function, but it gives me error:

It's something like this:

form.php

<form action="../process.php" method="post">
(..)

process.php

<?php
require("UserController.php");

$a=new UserController;
$a->login();
?>


UserController.php
<?php

public class UserController
{

private $obj;

function __construct( ){ }

public function login()
{}
(..)
}


Does anybody can tell me why my code only works until the "$a->login();" in process.php? Is anything wrong?

thanks for help!
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: change a string where have number after a word
Next Topic: Problem with readdir and ssh2
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Nov 29 17:02:01 GMT 2024

Total time taken to generate the page: 0.05623 seconds