www.webdeveloper.com
Results 1 to 5 of 5

Thread: $_post

  1. #1
    Join Date
    Nov 2006
    Posts
    41

    $_post

    Script posts dynamically created fields's value. The names to these fields are given on the fly. After posting i have to save the values of posted fields in a database. But i dont know the names of the fields posted. so i cannot use $_POST['name'].
    is there anyway to get them? Thanks

  2. #2
    Join Date
    Feb 2005
    Location
    Tauranga
    Posts
    2,062
    If i am understanding you correctly,

    Are the field names dynamic every time? What do you want to do with the Data ?

  3. #3
    Join Date
    Nov 2006
    Posts
    41
    i edit cells of a big table. the edited cells' values are being inserted into dynamically created input field.if edited cell's id is 'cell12', then the field created gets name 'mcell12' and id 'mcell12', if i edit 'cell233' field gets name 'mcell233'.after that it is posted. i need to get data via POST.
    does it matter what am i gonna do with d posted value? i use GET, but it is not secure. i guess i will have to use ajax.any help appreciated.

  4. #4
    Join Date
    Nov 2003
    Location
    Worthington, OH, USA
    Posts
    3,634
    Maybe this will give you some ideas:

    PHP Code:
    <table>
    <?php 
    foreach ( $_POST as $ind=>$val ) {
        echo 
    "<tr><td> $ind </td><td class='val'> $val </td></tr>";
    }
    ?>
    </table>
    54 68 65 42 65 61 72 4D 61 79

  5. #5
    Join Date
    Nov 2006
    Posts
    41
    Quote Originally Posted by TheBearMay
    Maybe this will give you some ideas:

    PHP Code:
    <table>
    <?php 
    foreach ( $_POST as $ind=>$val ) {
        echo 
    "<tr><td> $ind </td><td class='val'> $val </td></tr>";
    }
    ?>
    </table>
    OK i will check it out, thank you.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles