Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / NewStats: 3,195,085 members, 7,957,054 topics. Date: Tuesday, 24 September 2024 at 06:04 AM |
Nairaland Forum / Science/Technology / Programming / Correct This Registration Form Code Please!!! (3302 Views)
I Need Services Of Someone Who Can Correct Website Code Written With HTML5 & PHP / Which Is Correct / My Website Date Is Not Correct Why??? (2) (3) (4)
Correct This Registration Form Code Please!!! by KvnqPrezo(m): 10:56am On Sep 09, 2016 |
<html> <head> <title>Romanticpie|Registration</title> </head> <body> <p>Registration</p> <form action="process.php" method="POST"> First Name: <input type="text" name="first_name" value="Enter your name" ><br /> Last Name: <input type="text" name="last_name" value="Last Name" ><br /> Profile picture:<br /> <input type="file" name="profile_pix" accept="image/*" /><br /> Username: <input type="text" name="user_id" value="Username" ><br /> Password: <input type="password" name="secret_code" value="your password" ><br /> Email: <input type="email" name="Email_address" value="Enter your email address"><br /> Sex: <input type="radio" name="gender" value="male">Male <input type="radio" name="gender" value="female">Female<br /> Country: <select type="dropdown" name="Country"> <option value="Nigeria" selected>Nigeria</option> <option value="Ghana">Ghana</option> <option value="Kenya">Kenya</option> <option value="Togo">Togo</option> <option value="Botswana">Botswana</option> <option value="South Africa">South Africa</option> <option value="Mali">Mali</option> <option value="Biafra">Biafra</option> </select><br /> <input type="checkbox" name="Terms_and_conditions" >By clicking sign up you've agreed to obey our <a href="http://www.romanticpie.com/p/terms.html"> Terms and Conditions.</a><br /> <br /> <input type="submit" value="Sign Up"> </form> </body> </html> I woke up this morning and just decided to create a registration form... . I want to know if there's any err. . Is there any way to shorten the code? . How can I apply JavaScript so that when you miss any info you won't be allowed to sign up... . How can I forward those details to a specific email address instead of database... . Just add your own jara to made it more advanced... NB: There's no CSS yet am just doing it for fun and learning purposes... I typed from it from my mobile phone and viewed with offline code viewer...
|
Re: Correct This Registration Form Code Please!!! by KvnqPrezo(m): 11:49am On Sep 09, 2016 |
larisoft, dhtml18, Kofacts,shuaibazeez32.. Abeg check out |
Re: Correct This Registration Form Code Please!!! by teampregar(m): 1:24pm On Sep 09, 2016 |
To knw if any field is empty with javascript, i think u should use var inputName = document.getElementsByName(//Name of the form input).innerHTML; Then u use if (inputName.length == 0) { //Error for empty fields.. } Then to forward the details to an email address, u nid to involve a server side script then use AJAX to pass the details as json.. because javascript cant send emails.. u can create an array of details like.. var formdetails = [”Name”:”Pregar”,”Age”:17,etc] then use JSON.parse(formdetails) send the json with AJAX den u can decode it on the server side and send the email 1 Like |
Re: Correct This Registration Form Code Please!!! by KvnqPrezo(m): 1:58pm On Sep 09, 2016 |
teampregar:Lemmme pretend I know understand....please more clear |
Re: Correct This Registration Form Code Please!!! by Nobody: 9:40pm On Sep 09, 2016 |
KvnqPrezo: If I start writing code, I bet you won't understand jack... And I'd be doing your home-work for you. Give it a shot first, if it's not working try and identify the problem then come here for a solution. That way you'd already have basic understanding of whatever solution you receive. |
Re: Correct This Registration Form Code Please!!! by KvnqPrezo(m): 10:18pm On Sep 09, 2016 |
DanielTheGeek:I'm not writing the code for anything serious stuff...just to learn. |
Re: Correct This Registration Form Code Please!!! by ANTONINEUTRON(m): 11:07pm On Sep 09, 2016 |
User Can't enter Anitin In Diz Ur Form, U Have Already Set D Value In First Name, Last Name And Password So It Will Be D Default Data To Be Sent To "process.Php" Instead Use Placeholder="last name" .... |
Re: Correct This Registration Form Code Please!!! by KvnqPrezo(m): 9:17am On Sep 10, 2016 |
ANTONINEUTRON:Example please.. |
Re: Correct This Registration Form Code Please!!! by ANTONINEUTRON(m): 4:41pm On Sep 10, 2016 |
KvnqPrezo:This part of or code <form action="process.php" method="POST"> Use placeholder="first_name" instead. if u leave it like this, lets say I enter my name ANTONI what will be sent to process.php will be 'first_name' instead of 'ANTONI' |
Re: Correct This Registration Form Code Please!!! by KvnqPrezo(m): 7:42pm On Sep 10, 2016 |
ANTONINEUTRON:Okay thanks |
Re: Correct This Registration Form Code Please!!! by greatface(m): 9:51pm On Sep 10, 2016 |
I think you need to add extra stuff to that form tag to be able to upload that pics in your form. Am a learner though. |
Re: Correct This Registration Form Code Please!!! by ceekay214(m): 3:28am On Sep 11, 2016 |
Just simply use the 'required' attribute name and value on forms which are compulsory...... No JavaScript required....... Tnk me later |
Re: Correct This Registration Form Code Please!!! by ceekay214(m): 3:36am On Sep 11, 2016 |
Also , 4 forms which uses a textbox(eg passwords, text input) the value attribute is absent. If u want something inside d txtbox, use a placeholder attribute or immediately after d right angled bracket(>) type wat u want 2 appear in d textbox...although u may need some JavaScript code 2 erase this when d user clicks on d text box.... Tnk me later
|
Re: Correct This Registration Form Code Please!!! by KvnqPrezo(m): 4:06pm On Sep 11, 2016 |
ceekay214:Using placeholder will It auto clean write up when been clicked |
Re: Correct This Registration Form Code Please!!! by ceekay214(m): 12:06am On Sep 12, 2016 |
KvnqPrezo:yes sir....use a placeholder attribute name, then set the value 2 wateva u want 2 appear in the box....once d user clicks d box, it auto erases.......tnk me later |
Re: Correct This Registration Form Code Please!!! by KvnqPrezo(m): 7:08am On Sep 12, 2016 |
ceekay214:Like seriously I need help! . I have learnt html/CSS but JavaScript is the problem... . It's not that I have not learnt JavaScript the problem I don't know when to use it... |
Re: Correct This Registration Form Code Please!!! by ceekay214(m): 1:03am On Sep 13, 2016 |
KvnqPrezo:I feel ur pain bro.....but JavaScript is not really compulsory on d web because not all browsers support it. It's just used 2 make ur web pages "sing" and "dance" except in areas such as form validation where JavaScript is a must. JavaScript is only a must(in my opinion) if u are into 2d game development......to help you better understand the uses ofJavaScript download XHTML and CSS for dummies |
Re: Correct This Registration Form Code Please!!! by KvnqPrezo(m): 3:06am On Sep 13, 2016 |
ceekay214:What topics is necessary for now!! . Because what am learning I haven't found it useful... . I understand PHP better.. |
Re: Correct This Registration Form Code Please!!! by KvnqPrezo(m): 3:07am On Sep 13, 2016 |
ceekay214:Thanks working asap,. |
Re: Correct This Registration Form Code Please!!! by Easyjay: 2:47pm On Sep 13, 2016 |
you won't be able to upload pictures in your form. You need to inlcude enctype = multipart (something of this format)..... to your form action. 1 Like |
Re: Correct This Registration Form Code Please!!! by KvnqPrezo(m): 6:55pm On Sep 13, 2016 |
Easyjay:Thanks lemme try now...whre should I add it <input type="file" enctype="multipart"> Or <form action="enctype blah blah blah |
Re: Correct This Registration Form Code Please!!! by Easyjay: 7:32pm On Sep 13, 2016 |
KvnqPrezo: <form action="process.php" method="POST" enctype="multipart/form-data"> |
Re: Correct This Registration Form Code Please!!! by guente02(m): 12:14am On Sep 14, 2016 |
ceekay214:Sir javascript is way more important than you put it na. U just ridiculed the tech stack ah ah. In his case alone java script can do some fun things like throwing up a pop up of some required fields are empty, it can even validate the email using regular expressions, and javascript and her numerous frameworks and libraries can pull some decent stunts you can't imagine from the front to the back end of a website. If you know javascript very well sef you can make some girls cuum and if you want to become a front end dev then prepare because you'll be consuming alota js. Don't Rush. 1 Like |
Re: Correct This Registration Form Code Please!!! by guente02(m): 12:17am On Sep 14, 2016 |
KvnqPrezo:You haven't probably you just skimmed through. You'll have to take your time and learn this thing my brother and do it slowly. Don't rush the basics, I beg thee. |
Re: Correct This Registration Form Code Please!!! by KvnqPrezo(m): 12:28am On Sep 14, 2016 |
guente02:Okay TX |
Re: Correct This Registration Form Code Please!!! by KvnqPrezo(m): 12:33am On Sep 14, 2016 |
Easyjay:Thanks 1 Like |
Re: Correct This Registration Form Code Please!!! by guente02(m): 12:38am On Sep 14, 2016 |
KvnqPrezo:Welcomed |
Re: Correct This Registration Form Code Please!!! by Nobody: 12:09pm On Sep 14, 2016 |
guente02: Lol, nice sense of humor. 1 Like |
Re: Correct This Registration Form Code Please!!! by KvnqPrezo(m): 1:08pm On Sep 14, 2016 |
guente02:I think I know the problem.... . Am learning with my Lumia phone but the app I'm using don't do stuffs like.. Var yourName = prompt("what's your name" if(" yourName !=NULL " { document.write("Hello = + yourName" }else{ alert("please enter your name" The app can't alert so I was confusing my self.. The app only excite stuffs like. Var randNum =5; document.write(" randNum++, ="; randNum++, "<"br"> That's the problem...I've got a better app ...learning smoothly... |
Re: Correct This Registration Form Code Please!!! by ceekay214(m): 12:10am On Sep 15, 2016 |
guente02:read thru a post b4 u spew trash.....wat do u tink I mean by 'sing and dance'?...say wat u may about js , d fact still remains------it ain't compulsory on d web |
Re: Correct This Registration Form Code Please!!! by Olumyco(m): 12:26pm On Sep 15, 2016 |
ceekay214: U need to correct this statement - "not all browsers support JavaScript". U might need to tell us that browser that doesn't support JavaScript.... |
How To Send Data To Excel In Vb 2008 Without Crystal Report? / Asp.net, Vb.net, C# Help Needed / Arduino Based Project:sms Based Electronic Voting Machine
(Go Up)
Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health religion celebs tv-movies music-radio literature webmasters programming techmarket Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10) Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 74 |