how i can count this ?

Discussion in 'Programming' started by coun_vincent, Jul 22, 2012.

  1. #1
    Hey ,

    i need someone to help me and tell me how i can count the number of my options usages ..... people are choosing 1 option from 6 options & i wanna count that selecteds and know which the option is selected much more .

    the code is :
    <form action = "javascript:void(null);" onsubmit = "load_ajax();" name = "myform">
            				<div id="form_bg">	
                    		<input id="url" class="input" type="text" name="url" value="<?php echo @$_GET['url'];?>"/>
                              <button type="submit" class="send_bt" value = "works"  name="">works</button>
                            </div>
                            <div id="f_for">
                                <input name = "quality" value = "0" checked = "checked" type = "radio"  class="radio_style">option1							
    							<input name = "quality" value = "1" type = "radio" class="radio_style">option2
                                <input name = "quality" value = "2" type = "radio" class="radio_style"><label>option3</label>
                                <input name = "quality" value = "3" type = "radio" class="radio_style"><label>option4</label>
                                <input name = "quality" value = "4" type = "radio" class="radio_style"><label>option5</label>
                                <input name = "quality" value = "5" type = "radio" class="radio_style"><label>option6</label>
    						</div>
                        </form>
    Code (markup):
    any solution ?
     
    Solved! View solution.
    coun_vincent, Jul 22, 2012 IP
  2. sarahk

    sarahk iTamer Staff

    Messages:
    28,828
    Likes Received:
    4,541
    Best Answers:
    123
    Trophy Points:
    665
    #2
    You are saving this into a database, right?

    So just query the database and ask it how many have given that answer.

    If you need help creating queries then I'd recommend sqlyog which has a query builder.
     
    sarahk, Jul 22, 2012 IP
  3. coun_vincent

    coun_vincent Well-Known Member

    Messages:
    803
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    130
    #3
    i am not using the Database and also i need a solution without using database Query if it's possible
     
    coun_vincent, Jul 23, 2012 IP
  4. #4
    If you aren't using anything to store the results of the form then you have no "record" to check back on.

    If you have a copy of the form results emailed to you then you can, atleast, manually go through an tally up the results.

    I've been using a database on my sites since '99 and I've also used plain text files to store data. You need to record the info somehow if you want to ever "collate" the information.
     
    sarahk, Jul 23, 2012 IP