Ik ben bezig met een member script, maar nou als ik in het formulier de gevens invul krijg ik in de database bij website en bij email voor de ingevulde waardes een stuk of 6 spaties waar ligt dit aan???
dit is het script:
<?php
//maschel.nl member system beta 1.0
echo "<h3>maschel.nl member system beta 1.0</h3><br><br<br>\n";
//maschel.nl member system beta 1.0
require("mysql.php");
$activcode = rand(1000000, 9999999);
$sql1 = mysql_query("SELECT username, password FROM member WHERE email='$HTTP_POST_VARS[email]'");
$email_check = mysql_num_rows($sql1);
if($email_check == 0) {
$sql2 = mysql_query("SELECT username, password FROM member WHERE username='$HTTP_POST_VARS[username]'");
$user_check = mysql_num_rows($sql2);
if($user_check == 0) {
if (isset($_POST["username"]) && isset($_POST["email"]) && isset($_POST["con_email"]) && isset($_POST["password"])
&& isset($_POST["con_password"]) && ($_POST["password"] == $_POST["con_password"] && $_POST["email"] == $_POST["con_email"]))
{
$sql3 = "INSERT INTO member (id, username, email, password, name, country, msn, website, activcode, activ) VALUES ('', '$HTTP_POST_VARS[username]', '
$HTTP_POST_VARS[email]', '$HTTP_POST_VARS[password]', '$HTTP_POST_VARS[name]', '$HTTP_POST_VARS[country]', '$HTTP_POST_VARS[msn]', '
$HTTP_POST_VARS[website]', '$activcode', '0')";
$res = mysql_query($sql3);
if ($res) {
echo "<font color=\"green\">Your account is sucsesfully added.</font><br>";
echo "an e-mail has been send to: $_POST[email] with a link in it to activate your account";
$from = "[email protected]";
$message = "Activation member account maschel.nl\n";
$message .= "Copy this link into your browser to activate your account:\n";
$message .= "http://www.maschel.nl/beta-members/activate.php?activcode=$activcode\n";
$message .= "Thnx for making an account on maschel.nl\n";
mail($_POST["email"], "Activate your account on maschel.nl", $message);
}else{
echo "an error has encorred please try again.";
echo('<br>'.mysql_error()); }
}else {
echo "<font color=\"red\">You didn't fill in everything! and/or user/user and/or pass/pass aren't the same</font><br>\n";
echo "<a href=\"register_form.php\">Click here to go back</a><br><br>\n"; }
}else {
echo "<font color=\"red\">Username already exists!</font>"; }
}else{
echo "<font color=\"red\">Email already exists</font>"; }
//don't delete copyright>>>>>
echo "<br><br><br><br><p align=\"center\"><font size=\"1px\">copyright 2005 <a href=\"http://www.maschel.nl\">www.maschel.nl</a></font></p>";
//don't delete copyright>>>>>
?>
808 views