Hello, once again I'm back.
I'm still working on my forum system (My personal use only in practice of PHP coding), and last night got the "base" (Still will need all those minor details the people love so much) of all thread of the forum list index, thread listing index (Forum View) and post listing (Thread view) done.
Now I want to make this a members only system.
I took a look at a few tutorials, etc and get the drift of how to do it, but I've came acrossed an issue.
I have my system modulized in - ?page=blah , etc..
Anyways.. my main php page reads as follows
<?php
include("W:/www/modulization/templates/register.php");
if(isset($_POST['submit'])) {
$username = $_POST['username'];
$username = stripslashes(trim($username));
$username = nl2br($username);
$username = htmlentities($username);
$password = $_POST['password'];
$password = stripslashes(trim($password));
$password = nl2br($password);
$password = htmlentities($password);
$email = $_POST['email'];
$email = stripslashes(trim($email));
$email = htmlentities($email);
$register_ip = $HTTP_SERVER_VARS["REMOTE_ADDR"];
$query = "INSERT INTO members (name, password, email, register_ip)
VALUES ('$username', '$password', '$email', '$register_ip')";
mysql_query($query);
}
?>
And my template is as follows for the registration box >>
<tr>
<form method='post' action="http://localhost/modulization/sources/register.php">
<td class='forumcell2' width='20%'>Username</td>
<td class='forumcell2' width='80%'><input name="username" MAXLENGTH="20"></td>
</tr>
<tr>
<td class='forumcell2' width='20%'>Password</td>
<td class='forumcell2' width='80%'><input name="password" MAXLENGTH="16"></td>
</tr>
<tr>
<td class='forumcell2' width='20%'>Email</td>
<td class='forumcell2' width='80%'><input name="email" MAXLENGTH="25"></td>
</tr>
<tr>
<td colspan='2' class='forumcell' width='100%' align='center'><input type='submit' value='Register'></td>
</tr>
</form>
So, now when it submits --> It doesn't insert the database information... at all. Any help? I've used <?= $_SERVER['php_self']?> as the action also, and it doesn't seem to help me one bit.