Page 1 of 2 12 LastLast
Results 1 to 10 of 12
  1. #1

    Default php help..<?php radio button?>


    unsay paagi diay mga bro
    kung ang imong data kuha.on
    gikan sa radio button?

    unsa.on mana xa para inig click
    nako sa button nga update,
    updated jud xa sa db?

  2. #2
    kung wala ko masayop bro, parehas rman gihapon ang pgkuha sa data sa radio button ug sa textfields...
    ex.
    Code:
    <input type="radio" name="test" value="Test" />Test
    inig submit ky mao ni pagkuha sa data: $radio = $_POST['test']
    update dayun sa db...

  3. #3
    <?php

    //check if btnupdate in the form is activated or was clicked
    if(isset($_POST["btnupdate]) || $_POST["btnupdate]!=""){


    //update db here. considering you're connected with the database
    mysql_query("UPDATE tblfrm SET fldradio=".$_POST['roption']." "); //which is equal to 1

    }


    ?>

    <html>
    <body>
    <form name="frm" action="<?php echo $_SERVER['REQUEST_URI']; ?>" method="post">
    <input type="radio" name="roption" value="1">
    <input type="submit" value="update" name="btnupdate">
    </form>
    </body>
    </html>

    I hope I help you

    Post Free job ads/resume @ cebujobline.com

  4. #4
    Quote Originally Posted by cHiAnBoy View Post
    kung wala ko masayop bro, parehas rman gihapon ang pgkuha sa data sa radio button ug sa textfields...
    ex.
    Code:
    <input type="radio" name="test" value="Test" />Test
    inig submit ky mao ni pagkuha sa data: $radio = $_POST['test']
    update dayun sa db...
    got it.
    tnx bro..

  5. #5
    salamat kaau mga master..
    kuha na..
    hehehe..
    praktis ko php mga master gud..
    basic knowledge pa ang naa sa ako utok.

  6. #6
    wy problema bai, tinabangay lng gud ta, dli sd ko master... nkaexperience lng ko ana....

  7. #7
    Quote Originally Posted by cHiAnBoy View Post
    kung wala ko masayop bro, parehas rman gihapon ang pgkuha sa data sa radio button ug sa textfields...
    ex.
    Code:
    <input type="radio" name="test" value="Test" />Test
    inig submit ky mao ni pagkuha sa data: $radio = $_POST['test']
    update dayun sa db...
    i usually do it this way:

    Code:
    <input type="radio" name="test[]" value="Test" />Test
    PHP Code:
    $radio $_POST['test'
    for nested arrays
    Code:
     <input type="radio" name="test[test-1][]" value="Test" />Test
    PHP Code:
    $radio $_POST['test']['test-1'
    if you are planning to save it on the database, i suggest serialize it...

    PHP Code:
    $radio  serialize($radio ); 

  8. #8
    nice bai, cnsya na dili kaau ko maau gud...

  9. #9
    Quote Originally Posted by cHiAnBoy View Post
    wy problema bai, tinabangay lng gud ta, dli sd ko master... nkaexperience lng ko ana....
    ahw..
    pero salamat lang jd kaau.

  10. #10
    Quote Originally Posted by salbahis View Post
    i usually do it this way:

    Code:
    <input type="radio" name="test[]" value="Test" />Test
    PHP Code:
    $radio $_POST['test'
    for nested arrays
    Code:
     <input type="radio" name="test[test-1][]" value="Test" />Test
    PHP Code:
    $radio $_POST['test']['test-1'
    if you are planning to save it on the database, i suggest serialize it...

    PHP Code:
    $radio  serialize($radio ); 

    master, what is serialize?
    i googled it pero lisod kaau sabton dah..
    hehe

  11.    Advertisement

Page 1 of 2 12 LastLast

Similar Threads

 
  1. Im learning PHP, Help me hw to run the PHP!
    By kyme in forum Programming
    Replies: 23
    Last Post: 08-21-2012, 02:57 AM
  2. Replies: 33
    Last Post: 10-17-2008, 04:09 PM
  3. Help with PHP Login Stuff
    By poymode in forum Programming
    Replies: 36
    Last Post: 06-20-2008, 07:57 AM
  4. PHP help me
    By poymode in forum Programming
    Replies: 8
    Last Post: 07-28-2007, 02:57 PM
  5. PHP help
    By tjyrna in forum Networking & Internet
    Replies: 1
    Last Post: 07-06-2006, 11:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top