Register



Closed Thread
Results 1 to 2 of 2

Thread: Input fields and variables in a form

  1. #1
    djtreble's Avatar
    Status : djtreble is offline
    Posts : 1
    Thanks : 0
    Thanked: 0
    Rep : 1
    djtreble is on a distinguished road

    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
    Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!


  2. #2
    okapopin's Avatar
    Status : okapopin is offline
    Posts : 118
    Thanks : 0
    Thanked: 4
    Rep : 2
    okapopin is on a distinguished road

    Default

    I did found any wrong..
    Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!

Closed Thread

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

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

SEO Consult