shadowdemon 0 Report post Posted September 26, 2005 http://forums.xisto.com/no_longer_exists/ im testing this page as a join but none of my codes work can someone help me Share this post Link to post Share on other sites
dogomchawi 0 Report post Posted September 26, 2005 There are a ton of things wrong with that code =)Give me 10 minutes and I will upload a reworked version of it that should at least help you to get started.I see that you did sort of take my advice on my post in the last topic that you made.Hang in there a couple minutes... Share this post Link to post Share on other sites
dogomchawi 0 Report post Posted September 26, 2005 OK - I did a quick reworking of the codeIt should now work - assuming you have the actual databases set up. You need to have made a table with the name "Member" and it has to have columns named "loginName", "createDate", and "password"This is a very basic code for a page that is going to let users sign up on your site tho and i recommend (once again) that you follow an example from an actual script.You need to ask for the password twice and then compare them to make sure that the person put the password that they intended to have (with no typo's kind of deal)I would also do something with the email. You ask them for the email and then dont do anything with it.I would also recommend that you indent stuff like I did. Otherwise it is hard to see the structure of the code. In your code there were misplaced table tags and stuff that were hard to see unless you indent the code as you do.And without any further adue here is the code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://forums.xisto.com/no_longer_exists/ http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>Login</title></head><body><?php//// MAKE sure that the feilds have been entered inif ( isset($_POST['loginName']) ) { $loginName = $_POST['loginName']; } else { $message = "<br /> YOU NEED TO ENTER A LOGINNAME<br />"; };if ( isset($_POST['password']) ) { $password = $_POST['password']; } else { $message = "<br /> YOU NEED TO ENTER A PASSWORD<br />"; };if ( isset($_POST['email']) ) { $email = $_POST['email']; } else { $message = "<br /> YOU NEED TO ENTER AN EMAIL<br />"; };/// IF all the feilds were given values THEN insert thier information into the databaseif ( $email && $password && $loginName ){ /// Initialize and run the MYSQL query to insert teh stuff into the database $sql = mysql_query( "INSERT INTO Member (loginName, createdate, password) values ('$loginName', NOW() ,'$password')" ) or die (mysql_error()); }else{ echo "$message"; }?><font face='arial' size=2><b>All fields marked with a * are required:</b></font><br><form name="form1" method="post" action="/join.php"> <table border=1 bordercolor='#000000'> <tr> <td> <table width='50%' border=0> <tr> <td bgcolor='#C0C0C0'>UserName<font color='#ff0000'>*</font>:<input type="text" name="loginName"></td> </tr> <tr> <td bgcolor='#CCCCCC'>Email<font color='#ff0000'>*</font>:<input type="text" name="email"></td> </tr> <tr> <td bgcolor='#C0C0C0'>Password:<input type="text" name="password"><br /></td> </tr> </table> </td> </tr> </table> <input type="submit" value="submit" name="submit"></form></body></html> Share this post Link to post Share on other sites
shadowdemon 0 Report post Posted September 26, 2005 one of those codes was a form thing i made iwith the form maker thingy so it would send that info to me then i put the stuff in manually then the other was just a test of some codes Share this post Link to post Share on other sites
dogomchawi 0 Report post Posted September 26, 2005 oh okWell that code that I posted there for you should do all that you want it too.Then all you need to do is fix it up a little more with whatever else you want and you have a really simple registration pageOne thing i forgot to add is a "Congrats Your now a member of the coolest website!" type message that lets people know that they successfully registered on your site. Share this post Link to post Share on other sites
shadowdemon 0 Report post Posted September 27, 2005 ok and one thing i put the code on my site and when i filled the info out to test it it said no such database and i looked in the code and didnt see anything about database only about table Share this post Link to post Share on other sites