pls help me out anyone ,i have create fields tables in database ok,but these details which user will regester with details,how should i connect database so that i can view users details in myphpadmin.
firstname,lastname,username,password,confirm password,email,confirm email,date of birth,gender,state,country. i have created fields,in database,but to details of users when they register in this register form which i have created.
Iam using dreamweaver cs4. just started creating website,and stuck in register form.
<html><title>registerform</title>
<boby>
<script type="text/javascript">
<!--
function MM_validateForm() { //v4.0
if (document.getElementById){
var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
if (val) { nm=val.name; if ((val=val.value)!="") {
if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\
';
} else if (test!='R') { num = parseFloat(val);
if (isNaN(val)) errors+='- '+nm+' must contain a number.\
';
if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
min=test.substring(8,p); max=test.substring(p+1);
if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\
';
} } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\
'; }
} if (errors) alert('The following error(s) occurred:\
'+errors);
document.MM_returnValue = (errors == '');
} }
//-->
</script>
<style type="text/css">
<!--
body {
background-image: url(images/bg_16.gif);
color: #F00;
font-size: 18px;
}
-->
</style><link href="register_css.htm" rel="stylesheet" type="text/css">
<form action="register.php" method="POST">
<blockquote onClick="MM_validateForm('firstname','','R');return document.MM_returnValue">
<table width="50%" height="726" border="6" align="center" cellpadding="4" cellspacing="20" id="register.form">
<tr>
<td align="right" bgcolor="#33FFFF">Firstname:</td>
<th align="left" bgcolor="#33FFFF"><input name="firstname" type="text" id="firstname" maxlength="50"></th>
</tr>
<tr>
<td align="right" bgcolor="#33FFFF">Lastname:</td>
<td align="left" bgcolor="#33FFFF"><input name="lastname" type="text" id="lastname" maxlength="50"></td>
</tr>
<tr class="username">
<td align="right" bgcolor="#33FFFF"><label for="username">Username:</label></td>
<td align="left" bgcolor="#33FFFF" class="username"><input name="username" type="text" id="username" maxlength="50"></td>
</tr>
<tr>
<td align="right" bgcolor="#33FFFF"><label for="password">Password:</label></td>
<td align="left" bgcolor="#33FFFF"><input name="password" type="password" id="password" maxlength="50"></td>
</tr>
<tr>
<td align="right" bgcolor="#33FFFF">Confirm Password :</td>
<td align="left" bgcolor="#33FFFF"><input type="text" name="confirmpassword" id="confirmpassword"></td>
</tr>
<tr>
<td align="right" bgcolor="#33FFFF"><label for="email">Email:</label></td>
<td align="left" bgcolor="#33FFFF"><input type="text" name="email" id="email"></td>
</tr>
<tr>
<td align="right" bgcolor="#33FFFF"><label for="confirmemail3">Confirm Email:</label></td>
<td align="left" bgcolor="#33FFFF"><input type="text" name="confirmemail" id="confirmemail3"></td>
</tr>
<tr>
<td align="right" bgcolor="#33FFFF"><label for="dateofbirth">Date of Birth:</label></td>
<td align="left" bgcolor="#33FFFF"><input type="text" name="dateofbirth" id="dateofbirth"></td>
</tr>
<tr>
<td align="right" bgcolor="#33FFFF"><label for="gender">Gender:</label></td>
<td align="left" bgcolor="#33FFFF"><select name="gender" id="gender">
<option SELECTED >-select-</option>
<option value="m">Male</option>
<option value="f">Female</option>
</select></td>
</tr>
<tr>
<td align="right" bgcolor="#33FFFF"><label for="address"> Address:</label></td>
<td align="left" bgcolor="#33FFFF"><p>
<label for="textfield"></label>
<input type="text" name="address" id="address">
</p></td>
</tr>
<tr>
<td align="right" bgcolor="#33FFFF"><label for="pincode">Pincode:</label></td>
<td align="left" bgcolor="#33FFFF"><input type="text" name="pincode" id="pincode"></td>
</tr>
<tr>
<td align="right" bgcolor="#33FFFF">State:</td>
<td align="left" bgcolor="#33FFFF"><input type="text" name="state" id="state"></td>
</tr>
<tr>
<td align="right" bgcolor="#33FFFF">Country:</td>
<td align="left" bgcolor="#33FFFF"><input type="text" name="counrty" id="counrty"></td>
</tr>
</table>
<p> </p>
<p>
<input name="submit" type="submit" id="submit" onClick="MM_validateForm('firstname','','R','lastname','','R','username','','R','password','','R','confirmpassword','','R','email','','RisEmail','confirmemail','','RisEmail','dateofbirth','','R','address','','R','pincode','','RisNum','state','','R','counrty','','R');return document.MM_returnValue" value="register">
</p>
</form>
</body>
</html>