TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 07-12-2008, 12:19 AM   #1 (permalink)
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
 



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 01:19 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design