Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New Coder
    Join Date
    Sep 2004
    Posts
    54
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Help passing a string in a form

    This could be really simple, I have a form on my site that i want people to be able to type an items name into, and then it will string that item into a query.

    The problem I've having is that I want to use a switch, so my action for the form is: ACTION="/beta/tables.php?mod=detail", and then the name of the field is "name".

    But when I type a name in the form to pass it, it removes the "mod=detail" and just puts the "name" string in.

    Is there something I'm missing here? Or is this just not possible?

  • #2
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,081
    Thanks
    11
    Thanked 99 Times in 97 Posts
    either add method="POST" to your <form> tag , OR if you want to use GET send 'mod' as a hidden field.

    <input type="hidden" name="mod" value="detail" />
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #3
    New Coder
    Join Date
    Sep 2004
    Posts
    54
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Awesome! Thanks so much. I knew there was an easy fix, sometimes after looking at code all day my brain just can't process any more!


  •  

    Posting Permissions

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