simple form in php

Discussion in 'PHP' started by fafa7080, Nov 12, 2008.

  1. #1
    hi all
    i want to design a form in php
    anyone can help with the code
    http://niazmandiha24.com/html_test/index.htm
    this is a demo of what i want in(just to show what i need)

    part 1 of the code)
    if the user does not enters his username

    the first submit botton will not work
    force the user to type his username
    show some symbol like * that he/she dident enters his username
    and some symbol show if he typed his username

    -------------------------------------------------------------------------------------------

    part 2)

    it will show the text area's according to the numbers



    the text area's for email will show according to the numbers exactly after the first submit button not before
    that

    ---------------------------------------------
    if the number in drop box is #1

    1*5=5
    automatically 5 text area for typing email addresses will be open

    ---------------------------------------------
    if the number in drop box is #2
    2*5=10
    automatically 10 text area for typing email addresses will be open


    --------------------------------------------------------------------------------------------------------------------------------------

    by clicking 2nd submit button one copy of email addresses+
    the username will be send to one email address suppose

    important note 1*)if any of the email addresess filed was not entered, again * symbol
    or some symbol or some message displayed that he/she dident type the email addresses
    important note 2 *) if the captha code he enters is wrong the 2nd sumbit button will not be appear

    note :2nd submit button will apear if every thing is correct
     
    fafa7080, Nov 12, 2008 IP
  2. SoundRoom

    SoundRoom Peon

    Messages:
    26
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    <form name="form" method="post">
    <input type="text" name="field1">
    <button onClick="checkform()">Verify</button>
    </form>
    Code (markup):
    <script type="text/javascript">
    function checkform() {
    if (document.form.field1.value = '') {
    alert('Please enter username !'); }
    }
    </script>
    Code (markup):
    Hope it helps a bit :p Try to do a bit of research on javascript - that's exactly what you need !
     
    SoundRoom, Nov 12, 2008 IP
  3. fafa7080

    fafa7080 Member

    Messages:
    37
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #3
    thanks foe the help dude
    what about the drop box condition if number is one...
    if the number is 2.....
     
    fafa7080, Nov 12, 2008 IP
  4. SoundRoom

    SoundRoom Peon

    Messages:
    26
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Check this post : webmaster-talk.com/javascript-forum/52512-changing-a-variable-dropdown-onchange-function.html#post249606
    I don't want to copy/paste it's content here :p
     
    SoundRoom, Nov 12, 2008 IP
  5. fafa7080

    fafa7080 Member

    Messages:
    37
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #5
    you are really helpfull
    iam reading ot i hope this is what i want
    thanks for your quick help
    please make this topic instant emailnotification
    i ask my questions from you
     
    fafa7080, Nov 12, 2008 IP
  6. fafa7080

    fafa7080 Member

    Messages:
    37
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #6
    dude i dident undrestand the code at all
    it does not do anthing
    check this

    www.niazmandiha24.com/html_test/index2.htm

    what does this do?
     
    fafa7080, Nov 12, 2008 IP