SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Thread: forms..

  1. #1
    SitePoint Member XtraElusive's Avatar
    Join Date
    Jul 2003
    Location
    CA
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Post forms..

    I'm trying to find the page in 'Build your own database driven website.....'
    that shows the input of values in a form being passed as hidden. I'm trying to create a register form that takes the values from the form, and inserts them into the database.

    neway my questions is:
    -what's the code for passing the input as hidden, and also a reference to that page in the book (i know i saw it!) would be great!

    thx
    -xtraelusive

  2. #2
    ********* Genius Mike's Avatar
    Join Date
    Apr 2001
    Location
    Canada
    Posts
    5,458
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you mean <input type="hidden" value="i cannot be seen"> ?
    Mike
    It's not who I am underneath, but what I do that defines me.

  3. #3
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    .
    ...
    <
    input type='hidden' name='Cmd' value='doAddUser' />
    .
    .
    ... 
    # rest of FORM 
    And then...

    PHP Code:
    .
    ...
    $Command = (string) $_POST['Cmd'];
    ... 
    Like that ?

  4. #4
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Off Topic:

    Dr. Livingston, you don't have to cast a POST value to a string, do you? I thought they all came through as strings. ???
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  5. #5
    Non-Member
    Join Date
    Jan 2003
    Posts
    5,748
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Umm... Not sure actually... I suppose it's more of a habit for me really more than anything else... ? Anyway, no harm leaving them in is there...

  6. #6
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Off Topic:

    Okay, just checking
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  7. #7
    SitePoint Member XtraElusive's Avatar
    Join Date
    Jul 2003
    Location
    CA
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I got it fixed, sorry I forgot about this thread +foud the page the same day. Thx tho and it was <input type='hidden' name='name' etc..


Bookmarks

Posting Permissions

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