Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
Pages: [1]
Send this topic | Print
Topic: Big Php Help... Confused!!!!!!  (Read 480 times)
« on: February 16, 2008, 03:04:27 AM »
TroyErvin Offline
Newbie

View Profile
*
Posts: 2



Hey Guys, i'm new to this, and i'm wondering if someone can help me with a Php system... there is this person that have a box like:

    <div class="box-content clearfix" id="login-habblet">
        <form action="post.php" method="post" class="login-habblet">
           
            <ul>
                <li>
                    <label for="habb" class="login-text">Username</label>
                    <input tabindex="1" class="login-field" name="habb" id="login-username" value="" type="text">
                </li>
                <li>
                    <label for="password" class="login-text">Password</label>
                    <input tabindex="2" class="login-field" name="password" id="login-password" type="password">
                    <input value="Log in" class="submit" type="submit">
                </li>
                <li class="no-label">
                    <input tabindex="3" name="_login_remember_me" id="login-remember-me" value="true" type="checkbox">
                    <label for="login-remember-me">Remember me</label>
                </li>

And it comes up in his a Post.php... How do i get a PHP System like that?
Report to moderator   Logged

 
« Reply #1 on: February 17, 2008, 08:46:26 PM »
TroyErvin Offline
Newbie

View Profile
*
Posts: 2



Bump Sorry i need an Answer
Report to moderator   Logged
« Reply #2 on: February 18, 2008, 03:30:50 PM »
chickenmeister Offline
master of chickens
Global Moderator
Member

View Profile WWW
*****
Posts: 206



you might want to read some php tutorials.

but basically, for the example you give. You would have some html page that has the form you gave, and a post.php file that would handle form when submitted. A simple example where you want the submitted info to be written to a file would go something like this:

Code:
<?php
$name 
$_POST['habb'];    // get the text from the input field with name 'habb'
$pw $_POST['password']; 
$file "sometextfile.txt";

$fp fopen($file"a+"); //get a file pointer in append mode
fwrite($fp"name: " $name "\npassword: " $pw "\n\n"); //write a string to that file
fclose($fp); // close the file pointer
?>
Report to moderator   Logged

Hello world!
 
Pages: [1]
Send this topic | Print
Jump to:  

Powered by SMF | SMF © 2006-2008, Simple Machines LLC