Jump to content

hubertj

New Members
  • Posts

    5
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

hubertj's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. hmm...nope...I have the form already however in this form there is 2 section. The first section is Class: where there will be 3 radio buttons (no multiple selection) Class 1 class 2 and class 3. The next Section,Categories, there will be 8 check box. There will be 8 different categories. The user can select multiple categories. Of the 11 selections in total, the user must at least choose 1 or else a message 'Please choose at least 1 permit type' will appear. And when the user select more then 1 class, for example class 1 and class 3, there should be a message,'Please select only one class'. If user select 1 class and 1 categories or 2 categories, system should proceed to allow them to apply for the permit, which means systems will retrieve the result of selection(s) and store in the database individually. For example if I choose to apply for Class 2 permit and a CAT 2TT permit, system will take the 2 selections separate them and store them in the database as 2 entries. If I choose 2 Categories, system should do the same as well. Screen shot of form: http://imgur.com/qOlv8 Coding for form: <div class="contents"> <form id="applicationoptions" method="post" action="s_apply_now.php"> <div id="optionshead">Class :</div> <div id="classoptions"> <input type="radio" name="class" value="1" /> Class 1 Permit <input type="radio" name="class" value="2" /> Class 2 Permit <input type="radio" name="class" value="3" /> Class 3 Permit </div> <div id="optionshead2">Categories :</div> <div id="catoptions"> <input type="checkbox" name="cat" value="1" /> CAT 2PG <input type="checkbox" name="cat" value="2" /> CAT 1OR <input type="checkbox" name="cat" value="3" /> CAT 2TT <br/><br/> <input type="checkbox" name="cat" value="4" /> CAT 3PG <input type="checkbox" name="cat" value="5" /> CAT 2OR <input type="checkbox" name="cat" value="6" /> CAT 3TT <br/><br/> <input type="checkbox" name="cat" value="7" /> CAT 4PG <input type="checkbox" name="cat" value="8" /> CAT 3OR </div> <div class="applynext"> <input class="applynextbutton" type="submit" name="applynextbutton" value="PROCEED" /> </div> </form> </div> Selections will be store in this Database schema: permit (PID, EID, PTYPE, STATUS, MID, HRID) PID - Permit ID primary key EID- Employee ID ( to store the employee ID of the applicant) PTYPE- Permit Type ( To store the type of permit employee apply for, eg. CAT 2TT) STATUS- (To know the status of the permit if it is approved or not) MID- Manager ID ( To store the employee ID of the manger who approve the permit application) HRID- Human Resource ID ( To store the employee ID of the HR manager who certified the application) How do you guys think?? Any way to improve?? Or did anyone do such a system before mind to share??? I am using PHP to achieve the results i am looking for but i am not sure if i am able to do so. This is not commercial for sure.
  2. Hi guys...I need some help in matching data from results of checkboxs and radio buttons. My Intentions: There are 3 radio buttons and 8 check boxes. Users can select any one but cannot don't select at all. I separate the calss and categories because for classes, users can only select 1 option whereas for categories users can select many. For example, User select class 1 but do not select anything else and click submit...the system will then retrieve that he selected and check the data base if he have the pre requisites to allow him to go through. Coding for my form: <form id="applicationoptions" method="post" action="s_apply_now.php"> <div id="optionshead">Class :</div> <div id="classoptions"> <input type="radio" name="class" value="1" /> Class 1 Permit <input type="radio" name="class" value="2" /> Class 2 Permit <input type="radio" name="class" value="3" /> Class 3 Permit </div> <div id="optionshead2">Categories :</div> <div id="catoptions"> <input type="checkbox" name="cat" value="1" /> CAT 2PG <input type="checkbox" name="cat" value="2" /> CAT 1OR <input type="checkbox" name="cat" value="3" /> CAT 2TT <br/><br/> <input type="checkbox" name="cat" value="4" /> CAT 3PG <input type="checkbox" name="cat" value="5" /> CAT 2OR <input type="checkbox" name="cat" value="6" /> CAT 3TT <br/><br/> <input type="checkbox" name="cat" value="7" /> CAT 4PG <input type="checkbox" name="cat" value="8" /> CAT 3OR </div> <div class="applynext"> <input class="applynextbutton" type="submit" name="applynextbutton" value="PROCEED" /> </div> </form> Lets say if user do not select any class, but select CAT 3PG, system will check if user have the pre-requisites before proceeding to next step. Any one can help me or give me hints?? most importantly is i do not know how to retreieve the values selected from the form. Is it possible to do it using php or must i hunt for javascript's script?? Thanks in advance guys...greatly appreciate.
  3. Hi...just want to check if all browser support HTML 5?? If i want to use HTML 5 to make form mandatory do i just add the word required will do??
  4. does PHP have a code to clear default values onlick?? For example if I have a text field...How do i insert blurry default value and when user click it the value will be gone if the user did not enter any value then the blurry default value would appear again?? Like on a sign up page...you want to let them know what is the format to by input into the fields. <label for="telno">Contact No.: </label> <input type="text" name="telno" id="telno" class="regfields"/>
  5. Hi Guys...i have this problem... I have this page where user can type in their date of birth...I would like to convert the date of birth input by the user to the DATA format which is defined by phpmyadmin (YYY-MM-DD) so that i can put into the database... My main objective of this is to calculate age... I have this form to allow use to type date of birth: <label for="dob">D.O.B.: </label> <input type="text" name="dob" id="dob" class="regfields"/> This is to store the input to a variable: $adddob = $_POST['dob']; and finally this query to insert all the input into the database: $query = "insert into emp (FNAME, LNAME, CDSID, PAYNO, MAIL , TELNO , DOB , BRANCH , LICNO , CLASS , VFROM , VTO , EID , PASS , PIN) values ('$addfname','$addlname','$addcdsid','$addpayno','$addmail','$addtelno','$adddob','$addbranch','$addlicno','$addclass','$addvfrom','$addvto','$addeid','$addpassword','$addpin')"; Thanks in advance...If this is possible then I will set my dob column to the DATA format...
×
×
  • 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.