Click here to Skip to main content
15,922,325 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: asp.net dropdownlist Pin
Bradml12-Dec-06 20:01
Bradml12-Dec-06 20:01 
AnswerRe: asp.net dropdownlist Pin
RichardGrimmer14-Dec-06 5:33
RichardGrimmer14-Dec-06 5:33 
QuestionHow to creat register form ? Pin
Golden01212-Dec-06 17:45
Golden01212-Dec-06 17:45 
AnswerRe: How to creat register form ? Pin
Bradml12-Dec-06 19:13
Bradml12-Dec-06 19:13 
GeneralRe: How to creat register form ? Pin
Golden01212-Dec-06 21:35
Golden01212-Dec-06 21:35 
GeneralRe: How to creat register form ? Pin
Bradml12-Dec-06 21:49
Bradml12-Dec-06 21:49 
GeneralRe: How to creat register form ? Pin
Golden01212-Dec-06 23:01
Golden01212-Dec-06 23:01 
GeneralRe: How to creat register form ? [modified] Pin
Bradml13-Dec-06 0:26
Bradml13-Dec-06 0:26 
I wrote this very quickly as an example. I have not checked it yet.
If you have any questions email me at:
brad -at- trueguava.com.

<p><html><br>
  <head><br>
  <title>Signup Page</title><br>
  <style type="text/css"><br>
  #errors{border:#FF0000 1px solid; background-color:#FFFF00}<br>
  </style><br>
  </head><br>
  <div id="form"><br>
  <?php<br>
  function printform($error){<br>
  <br>
  if($error){<br>
  echo "<div id=\"errors\">$error</div>";<br>
  }</p>
<p>?><br>
  <br /></p>
<p> <form id="form1" name="form1" method="post" action=""><br>
  Name:<br>
  <input name="txtname" type="text" id="txtname" /><br>
  <br /><br>
  Password:<br>
  <input name="txtpassword" type="password" id="txtpassword" /><br>
  <br /><br>
  Password Again: <br>
  <input name="txtrepassword" type="text" id="txtrepassword" /><br>
  <br /><br>
  <input type="submit" name="Submit" value="Submit" /><br>
  </form><br>
  </div><br>
  <?php<br>
  }</p>
<p>//Databse information (change for your mysql databse.)<br>
  $db_host = 'localhost';<br>
  $db_username = 'root';<br>
  $db_password = 'password';<br>
  $db_database_name = 'users';<br>
  $db_table = 'profiles';</p>
<p>//Checks if name field was entered<br>
  if(isset($_POST['txtname'])){<br>
  //If Name was entered:<br>
  <br>
  //check id passwords match<br>
  if(isset($_POST['txtpassword'])){<br>
  if($_Post['txtpassword'] === $_Post['txtrepassword']){<br>
  //Passwords match<br>
  //User must now be added to database.<br>
  $password = addslashes($_POST['txtpassword']);<br>
  $name = addslashes($_POST['txtname']);<br>
  <br>
  //Connect to databse and inser information.<br>
  $con = mysql_connect($db_host, $db_username, $db_password) or die('Connect failed.');<br>
  mysql_select_db($db_database_name, $con) or die('Could not select database');<br>
  mysql_query("INSERT INTO $db_table VALUES $name, $password", $con) or die('Error inserting user');<br>
  mysql_close($con);<br>
  <br>
  //Print success message<br>
  echo 'Your account was successfully created';<br>
  <br>
  }else{<br>
  printform('Passwords Don\'t match');<br>
  }<br>
  }<br>
  <br>
  }else{<br>
  //If name wasn't entered:<br>
  printform('You must specify a name!');<br>
  }</p>
<p>?><br>
  </html></p>



-- modified at 7:10 Wednesday 13th December, 2006


-- modified at 7:12 Wednesday 13th December, 2006



Brad
Australian
I assume Microsoft would not use doors, because using Windows is faster.

GeneralRe: How to creat register form ? Pin
Golden01215-Dec-06 15:36
Golden01215-Dec-06 15:36 
GeneralRe: How to creat register form ? Pin
Bradml16-Dec-06 0:13
Bradml16-Dec-06 0:13 
GeneralRe: How to creat register form ? Pin
JimmyRopes16-Dec-06 21:42
professionalJimmyRopes16-Dec-06 21:42 
QuestionCut through the Ajax hype Pin
solrac8112-Dec-06 9:02
solrac8112-Dec-06 9:02 
AnswerRe: Cut through the Ajax hype Pin
Pete O'Hanlon12-Dec-06 9:24
mvePete O'Hanlon12-Dec-06 9:24 
GeneralRe: Cut through the Ajax hype Pin
JimmyRopes16-Dec-06 21:52
professionalJimmyRopes16-Dec-06 21:52 
AnswerRe: Cut through the Ajax hype Pin
Bradml12-Dec-06 19:12
Bradml12-Dec-06 19:12 
GeneralRe: Cut through the Ajax hype Pin
Guffa12-Dec-06 21:21
Guffa12-Dec-06 21:21 
QuestionHow google option works? Pin
xyz2000000012-Dec-06 5:57
xyz2000000012-Dec-06 5:57 
AnswerRe: How google option works? Pin
led mike12-Dec-06 6:03
led mike12-Dec-06 6:03 
AnswerRe: How google option works? Pin
Pete O'Hanlon12-Dec-06 9:21
mvePete O'Hanlon12-Dec-06 9:21 
GeneralMessageBox Equivalent Pin
Brady Kelly12-Dec-06 2:46
Brady Kelly12-Dec-06 2:46 
GeneralRe: MessageBox Equivalent Pin
Vasudevan Deepak Kumar12-Dec-06 3:26
Vasudevan Deepak Kumar12-Dec-06 3:26 
GeneralRe: MessageBox Equivalent Pin
Brady Kelly12-Dec-06 3:29
Brady Kelly12-Dec-06 3:29 
GeneralRe: MessageBox Equivalent Pin
Pete O'Hanlon12-Dec-06 9:26
mvePete O'Hanlon12-Dec-06 9:26 
QuestionWebform Control vs HTML Control Pin
Nirene12-Dec-06 2:39
Nirene12-Dec-06 2:39 
AnswerRe: Webform Control vs HTML Control Pin
Chris Buckett22-Dec-06 4:31
Chris Buckett22-Dec-06 4:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.