Form variable concatenated

Discussion in 'HTML' started by Shabam, Sep 16, 2005.

  1. Shabam

    Shabam Guest

    I have a form page that accepts a text field variable. The problem is, I
    need to concatenate this text field variable with some other string. How
    can I get this done?

    So, suppose a user enters "hello" in the text box. When he submits the form
    I need the form variable DOMAINURL to be "hello.whatever.com" in the GET
    url.
     
    Shabam, Sep 16, 2005
    #1
    1. Advertising

  2. Shabam

    Oli Filth Guest

    Shabam said the following on 16/09/2005 00:56:
    > I have a form page that accepts a text field variable. The problem is, I
    > need to concatenate this text field variable with some other string. How
    > can I get this done?
    >
    > So, suppose a user enters "hello" in the text box. When he submits the form
    > I need the form variable DOMAINURL to be "hello.whatever.com" in the GET
    > url.
    >


    Why can't you do this server-side in the script that receives the form
    submission?


    --
    Oli
     
    Oli Filth, Sep 16, 2005
    #2
    1. Advertising

  3. Shabam

    Mark Parnell Guest

    In our last episode, Shabam <> pronounced to
    alt.html:

    > I have a form page that accepts a text field variable. The problem is, I
    > need to concatenate this text field variable with some other string. How
    > can I get this done?


    It is trivial to do, but the exact details depend on what language your
    form handler is written in. For example, in PHP:

    $newString = $_POST['fieldname'].'.example.com';

    --
    Mark Parnell
    http://clarkecomputers.com.au
    alt.html FAQ :: http://html-faq.com/
     
    Mark Parnell, Sep 16, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. dh
    Replies:
    0
    Views:
    334
  2. dejan budimir
    Replies:
    6
    Views:
    375
    Rolf Magnus
    Jul 4, 2004
  3. Prateek R Karandikar
    Replies:
    11
    Views:
    589
  4. Per Erik Stendahl

    Concatenated numerical literals

    Per Erik Stendahl, Mar 1, 2004, in forum: Python
    Replies:
    1
    Views:
    281
    Larry Bates
    Mar 1, 2004
  5. Replies:
    7
    Views:
    181
    Evertjan.
    Jun 22, 2006
Loading...

Share This Page