View Single Post
Old 07-12-2008, 12:19 AM   #1 (permalink)
cptnbunghole
The Visitor
 
Join Date: Jul 2008
Location: Florida
Posts: 3
Thanks: 1
cptnbunghole is on a distinguished road
Default OOP - Question[s]

Introduction: [Not Important]
Well I am pretty new to PHP programming and have been doing it for about 2 months on and off but I finally broke down and had to ask a few questions that have been stumping me with my code...

Question:
First off I am playing with OOP and MVC pattern and I am just basically experimenting with it and trying to learn how things work. Now Ive run into a question, my problem is I have a log in form here...

HTML Code:
<form name="login" method="post" action="">
<table width="200" height="100" border="1" bordercolor="#000066" align="center">
<tr><td bordercolor="#000066" colspan="2" align="center">Login</td></tr>
<tr><td bordercolor="#000066">Username:</td><td bordercolor="#000066"><input type="text" name="user" width="300"></td></tr>
<tr><td bordercolor="#000066">Password:</td><td bordercolor="#000066"><input type="password" name="pass" width="300"></td></tr>
<tr><td bordercolor="#000066" colspan="2" align="right"><input type="submit" name="login" value="Login"></td></tr>
<tr><td bordercolor="#000066" colspan="2" align="right"><a href="login.php?action=logout">Logout</a></td></tr></table>
</form>
It just a basic form but I am not sure where to send the data?

HTML Code:
<form name="login" method="post" action="">
I have my controller which handles the logic...

PHP Code:
<?php

require_once dirname(__FILE__) . "/action.php";

class 
User_Controller extends ActionController {



  public function 
doLogin() {
    
  }
  
  public function 
doRegister() {
    
  }


}


?>
(I stripped down the controller just so you have a basic idea of what im asking here.)

So again the question is how do I get the form to post to the controller(or wherever it should go) so I can then execute the rest of the log in process.

If my question Isn't clear I will try and explain more clearly or if you need more code examples or details just let me know. Thanks so much
Send a message via MSN to cptnbunghole
cptnbunghole is offline  
Reply With Quote