View Single Post
Old 2010-03-03, 10:38 PM   #2
mark6188
I'm going to the backseat of my car with the woman I love, and I won't be back for TEN MINUTES
 
mark6188's Avatar
 
Join Date: Sep 2009
Posts: 88
Send a message via ICQ to mark6188
I'm really not a php expert, so it's hard for me to look at the code you have and see the problem.

That said, I've written some simple registration type forms. From the way I understand your question, you are trying to put the actual data where you have the xxxxx?

Like $_POST('xxxxx') would be $_POST('mark6188')?

You don't put the data in the $_Post. You put the variable name.

So in your input form you would put the field 'user' and in the database it's called 'username'.

Hence you would set up the form with
<input type="text" name="user" id="user" />
<input type="text" name="pw" id="pw" />

let's say I put in your form where user=mark6188 and pw=abc123

Then do the insert query
$q = "insert into dbUser ('username', 'password') values ($_POST['user'], $_POST['pw'] )";


not sure if I have all the quotes and double quotes right, but the above should insert the correct values into your table.

If I misunderstood your question, please restate it and I'll try again. Hope that helps.
__________________
My Blog: Working The Business
mark6188 is offline   Reply With Quote