This is the script, its not working for some reason ! I cannot understand why!
this still wont work :S i think 'registrationdetails' (Username) Values ('$username')") is the part that is not working. I dont think $username is actually getting assigned to the string that the user inputted into the editbox, meaning the code is insert nothing so no new records are being made..PHP Code:<?php
$username = $_POST['username'];
$password = $_POST['password'];
$password2 = ['password2'];
If ($password == $password2) {
mysql_connect("localhost", "blahblah", "blah") or die mysql_error());
mysql_select_db("databasename") or die mysql_error());
mysql_query("INSERT INTO 'registrationdetails' (Username) Values ('$username')") or die(mysql_error()); }
elseif ($password != $password2) {
echo "passwords did not match" };
?>
this is the html for the edit box:
should it beHTML Code:<input type="text" id="Editbox2" size="16" name="Username" value="" maxlength="11">PHP Code:$username = $_POST['editbox2'];



LinkBack URL
About LinkBacks
Reply With Quote

