07-12-2008, 03:44 AM
|
#4 (permalink)
|
|
is cute and cuddly
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
|
Well, one way would be to transfer the logic to your user_controller.php file, something like this:
PHP Code:
<?php
require_once dirname(__FILE__) . "/action.php";
$pController = new User_Controller; $pController->doLogin();
class User_Controller extends ActionController {
public function doLogin() { if (isset($_POST['login'])) { // do your stuff } else { // set an error, redirect, whatever you want here } } public function doRegister() { }
}
?>
You can also play around with using __construct() to determine the course of action for the object when it's instantiated.
If you're not yet familiar with them, you can read up on them at the PHP site.
-m
|
|
|
|