Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class layout
- {
- public $action = '#';
- public $method = 'post';
- public $user = '';
- public $pass = '';
- function from_login()
- {
- $tmp_txt = "<form action='$this->action' method='$this->method'>";
- $tmp_txt .= "User name: <input type='text' name='fname'><br>";
- $tmp_txt .= "Password : <input type='password' name='lpass'><br>";
- if(!empty($this->user) and !empty($this->pass)){
- $tmp_txt .= "User:$this->user Pass:$this->pass <br>";
- }
- $tmp_txt .= "<input type='submit' value='Login'></form>";
- return $tmp_txt;
- }
- }
- ?>
- <html>
- <body>
- <?php
- $layout = new layout;
- if(isset($_POST['fname']) and isset($_POST['lpass']))
- {
- $layout->user=$_POST['fname'];
- $layout->pass=$_POST['lpass'];
- }
- echo $layout->from_login();
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement