Make a Simple Registration Form in PHP code example
Share
Example: registration form in php and mysql
DOCTYPEhtmlPUBLIC"-//W3C//DTD XHTML 1.0 Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><htmlxmlns="http://www.w3.org/1999/xhtml"><head><metahttp-equiv="Content-Type"content="text/html; charset=iso-8859-1"/><title>Registration Formtitle><style>input,textarea{width:200px}input[type=radio],input[type=checkbox]{width:10px}input[type=submit],input[type=reset]{width:100px}style>head><body><formmethod="post"enctype="multipart/form-data"><tablewidth="393"border="1"><tr><tdcolspan="2">echo @$msg;?>td>tr><tr><tdwidth="159">Enter your Nametd><tdwidth="218"><inputtype="text"placeholder="your first name"name="n"pattern="[a-z A-Z]*"required/>td>tr><tr><td>Enter your Emailtd><td><inputtype="email"name="e"/>td>tr><tr><td>Enter your Passwordtd><td><inputtype="password"name="p"/>td>tr><tr><td>Enter your Addresstd><td><textareaname="add">textarea>td>tr><tr><td>Enter your Mobiletd><td><inputtype="text"pattern="[0-9]*"name="m"/>td>tr><tr><tdheight="23">Select your Gendertd><td>
Male<inputtype="radio"name="g"value="m"/>
Female<inputtype="radio"name="g"value="f"/>td>tr><tr><td>Choose your Hobbiestd><td>
Cricket<inputtype="checkbox"value="cricket"name="hobb[]"/>
Singing<inputtype="checkbox"value="singing"name="hobb[]"/>
Dancing<inputtype="checkbox"value="dancing"name="hobb[]"/>td>tr><tr><td>Choose your Profile Pic td><td><inputtype="file"name="pic"/>td>tr><tr><td>Select your DOBtd><td><selectname="mm"><optionvalue="">Monthoption>for($i=1;$i<=12;$i++){echo".$i."";}?>select><selectname="dd"><optionvalue="">Dateoption>for($i=1;$i<=31;$i++){echo".$i."";}?>select><selectname="yy"><optionvalue="">Yearoption>for($i=1900;$i<=2015;$i++){echo".$i."";}?>select>td>tr><tr><tdcolspan="2"align="center"><inputtype="submit"name="save"value="Register Me"/><inputtype="reset"value="Reset"/>td>tr>table>form>body>html>