• Managed VPS
    1. #1
      Newbie djtreble's Avatar

      Join Date
      Nov 2009
      Posts
      1
      Thanks
      0

      Default Input fields and variables in a form

      Not sure if this is right section, please move if it's wrong.
      See the following:
      Code:
      <form action="{$config.base}{$config.dir}search.php" method="get">
      
        <input type="text" class="text" name="1" id="1" size="22"/>
        <input type="text" class="text" name="2" id="2" size="22"/>
      
          {assign var="1" value='input[id^=1]'}
          {assign var="2" value='input[id^=2]'}
          {assign var="whatwhere" value="$1""$2"} 
      
        <input:hidden class="text" name="what" id="what" size="22" 
        value="{$smarty.get.what|escape:"{$whatwhere}"}"/> 
        <input type="submit" value="{$lang.search}" class="button" />
      
      </form>
      Basically what I am trying to do in this form is take the field's, "1" & "2", values and combine them to be the value in the "what" hidden input.

      Can someone tell me what I'm doing wrong and what to do to get it working.

      Thanks
      Dylan

    2. #2
      Member okapopin's Avatar

      Join Date
      Dec 2009
      Posts
      118
      Thanks
      0

      Default

      I did found any wrong..

    Thread Information

    Users Browsing this Thread

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

       

    Similar Threads

    1. ASP.net web form at run time?
      By Michael in forum Programming
      Replies: 2
      Last Post: 02-18-2008, 11:07 AM
    2. PHP Basics-PHP VARIABLES
      By midlandi in forum PHP/MySql
      Replies: 0
      Last Post: 11-18-2007, 05:38 PM
    3. HTML form
      By edmond in forum Java Script/AJAX
      Replies: 1
      Last Post: 09-02-2007, 07:41 AM

    Visitors found this page by searching for:

    variable in input value form

    Tags for this Thread

    Like this page ? Spread the love :)

    Triphp Supporters:
    Advertise
    Advertise Advertise Advertise Advertise




    Advertise