• 0

Interting into a table


Question

Hey,

I want to make a normal page, that has a Username and Password and a submit button. It posts using a php file, and inserts username and password into a table that has username,password in it.

So If I typed, Blah into username and blah into password, it would insert them into the tables.

Thanks, :)

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

That's a big question. How much do you know? Do you have a database? Do you know SQL?

If you have the database and you've connected and such like, you just need to do:

$query = "INSERT INTO users VALUES ( " . $HTTP_POST_VARS["username"] . ", " . $HTTP_POST_VARS["password"] . )";
mysql_query( $query );

Of course you will probably have other fields to add, like an ID field for a start.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.