Im really annoyed now.
I cant figure it out heres my code:
I get the error:PHP Code:<?php
require("database.php");
mysql_connect($DBhost,$DBuser,$DBpass) or die("unable to connect");
@mysql_select_db($DBName) or die( "Unable to select database");
$query = "SELECT * FROM userlist";
$result = mysql_query($query);
$num= mysql_num_rows($result);
mysql_close();
echo "<b><center>Userlist</center></b><br><br>";
$i=0;
while ($i < $num) {
$username=mysql_result($result,$i,"username");
$ID=mysql_result($result,$i,"ID");
$email=mysql_result($result,$i,"email");
echo "<b>username: ".$username."</b><br>User #:".$ID."<br> E-Mail: ".$email."<hr><br>";
$i++;
}
$senddetails = "INSERT INTO userlist VALUES ($username,$password,"",$email)"
send = mysql_query($senddetails)
$validate = "$username = $_POST['username'];
$password = $_POST['password'];
$password2 = $_POST['password2'];
$email = $_POST['email'];
if($password != "" && $password == $password2){
echo($send);
}
else
{
echo("passwords did not match!");
}"
?>
<form name="form1" method="post" action="<?php
echo $validate;
?>
">
<label>Username
<input type="text" name="username">
</label>
<p>
<label>Password
<input type="password" name="password">
</label>
</p>
<p>
<label>Retype Password
<input type="password" name="password2">
</label>
</p>
<p>
<label>E-Mail
<input type="text" name="email">
</label>
</p>
<p>
<label>Register Me!
<input type="submit" name="Submit" value="Submit">
</label>
</p>
</form>
[/CODE]
Any help would be REALLY aprreciated."<?php
echo $validate;
?>
" is not valid value for the "action" attribute in any of the currently active versions. See the above warnings for more details.[HTML 4.0]




Reply With Quote