Jump to content

Need help with data entry code


abhishekdeveloper

Recommended Posts

Dear All,

 

I am developing a website www.computationalphotography.in on which I need to register new users. I have designed an HTML form for this purpose,

but will need help with writing the code for checking and validating the data in the respective fields. The code for my web form is below and the address

of the website is www.computationalphotography.in/registration.php:

 

<html>

<head>

	<title>

	Photography Experiment Registration
	</title>

</head>

<body>

	<h1>

	Questionnaire
	</h1>

	<h3>
	We would like to know about your background and interests in photography. For each multiple-choice question, please circle all answers that apply.</h3>
		<form method="post" action="registration.php">


		Name
		<input name="name" type="text">
		<br>
		<br>
		Email	

		<input name="email" type="text">
		<br>
		<br>
		1.) Roughly How many pictures do you take each year?
		<br>
		<br>			
		<input name="radios" type="radio" value="a">		
		a) a few: <10 in a year
		<br>
		<input name="radios" type="radio" value="b">
		b) many: probably 100's a photos a year
		<br>
		<input name="radios" type="radio" value="c">
		c) a lot: probably 1000's of photos a year
		<br>
		<br>

		2.) Do you share your pictures with anyone?
		<br>
		<input name="radios" type="radio" value="a">
		a) No
		<br>
		<input name="radios" type="radio" value="b">
		b) Yes, but only with friends or family
		<br>
		<input name="radios" type="radio" value="c">
		c) Yes, I share with friends or family and also post on public sites such as Flickr, Picasaweb, or Snapfish for anyone to see.
		<br>
		<input name="radios" type="radio" value="d">
		d) Yes, I share frequently and I have also published my photos in books or magazines, or exhibitde my photos in shows.	
		<br>
		<br>

		3.) How much training in photography have you had?
		<br>
		<input name="radios" type="radio" value="a">
		a) None
		<br>
		<input name="radios" type="radio" value="b">
		b) Some, but it's self-taught from books or websites
		<br>
		<input name="radios" type="radio" value="c">	
		c) Quite a bit: I have taken courses in photography
		<br>
		<input name="radios" type="radio" value="d">	
		d) A lot:I have completed a degreee or certificate in the subject
		<br>			
		<br>

		4.) How do you describe yourself as a photographer?
		<br>
		<input name="radios" type="radio" value="a">
		a) A novice:someone who takes a few pictures occasionally
		<br>
		<input name="radios" type="radio" value="b">
		b) An amateur:someone who takes many photos, but doesn't usually share them
		<br>
		<input name="radios" type="radio" value="c">
		c) An enthusiast:someone who loves to take pictures, possibly shows them with oters on public sites, or who might own a DSLR, or frequently uses a camera in other than "automatic mode"
		<br>
		<input name="radios" type="radio" value="d">
		d) An expert:skilled photographer who has published their work, or exhibited their work in shows, or has been paid for their work
		<br>
		<br>

		5.) Do you have artistic training or exposure?
		<br>
		<input name="radios" type="radio" value="a">
		a) No
		<br>
		<input name="radios" type="radio" value="b">
		b) I visit museums or art galleries
		<br>
		c) I have studied art: please describe
		<br>
			<textarea name="data5c" cols="50" rows="5">
			</textarea>					
		<br>				
		d) I am a practicing artist: please describe
		<br>
			<textarea name="data5d" cols="50" rows="5">
			</textarea>
		<br>
		<br>
		6.) Some optional information, if you don't mind. We respect your privacy.
		<br>
		<br>
		Age
			<br>
			<textarea name="6a" cols="1" rows="1">
			</textarea>
			<br>
			<br>
		Gender
		<br>
				<input name="radios" type="radio" value="a">
				a) Male
		<br>
				<input name="radios" type="radio" value="b">
				b) Female
		<br>
		<br>
		Languages Spoken	
			<br>
			<textarea name="6b" cols="25" rows="2">
			</textarea>
			<br>
			<br>
		Languages Read
			<br>
			<textarea name="6c" cols="25" rows="2">
			</textarea>
			<br>
		<br>
		<br>
		<input type="submit" value="Send">

		<input type="reset"  value"Reset">

		</form>

</body>

</html>

 

Kindly help me out with this issue. Thank you for your help in this regard.

Link to comment
Share on other sites

@batwimp...Thanks for pointing this out...this is one of the problems that I was facing currently with my code...

 

 

Your radio buttons are set up wrong. You need to have a different name= for each answer set. Right now, each answer has the same name, so you can only select one radio button throughout the entire form.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.