07-12-2008, 01:16 AM
|
#3 (permalink)
|
|
The Visitor
Join Date: Jul 2008
Location: Florida
Posts: 3
Thanks: 1
|
Thanks a lot for the help and as I said I am new to this so correct me where I am wrong or let me know if I am missing the point.
I understand the first bit of code.
PHP Code:
<?php
if (isset($_POST['login'])) { $pCtrl = new User_Controller; $pCtrl->doLogin(); }
?> <!-- insert form here -->
I used that same code in log in scripts before I learned about OOP and the MVC style. So if I where to include that code in the top of the log in form wouldn't that defeat the whole purpose of MVC, separating logic from view?
The second method "intermediary controller" sounds like the MVC style. How would you go about doing that? Cause I tried sending my form data to the user_controller.php
HTML Code:
<form name="login" method="post" action="<?php echo dirname(__FILE__) . "/user_controller.php"; ?>">
But all I got was an error from the browser(i think) saying it did not understand how to perform the task.
|
|
|