It's a simple idea of a form, when the submit button is clicked, the username and id update to a table on a localhost server, database named users, table named pwd.
However, I'm new to this and am stuck.
I know that I need to have a con.php file // connects to the server and database.
Then I need to have a file that updates the table, so when the submit button is clicked, it updates the files with the input information... This is where I'm stuck though.
I have a root user set up on the server, still using the default no password at least until I get this situated.
Any help or suggestions would be awesome! I've been looking all over and just getting confused on what to do for the update file.
Here is the usercreate file - to update the server.
<?php //usercreate.php require_once("database.php"); $strOne = $_POST['Username']; $strTwo = $_POST['pwd']; $sql = 'INSERT INTO `users`.`pwd` (`Username`, `pwd`) VALUES (\'$strOne\', \'$strTwo\');'; ?>
and the newuser form
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <? php include_once("usercreate.php"); ?> <head> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> <title> Welcome New Users </title> <link type="text/css" rel="stylesheet" href="DIYFYI.css" /> </head> <body> <form action="<usercrea.php); ?>" method="post"> User Name : <input type ="text" name ="Username" /><br /> Password: <input type ="password" name ="pwd" /><br /> <input type ="submit" value="Submit" /> <br /> </form> Return to the <a href="index.php"> Homepage </a> </body> </html>