View Full Version : Html Variable Substitution

03-07-2005, 04:27 PM
In the working example below there are 2 input boxes. In the real applicaion there are actually 12. The objective is to get the information typed in the input boxes to be included in the body of the email some how, some way. For simplicity, I would really like to keep it confined to just HTML coding.

This is about as simple as I can make it.

Name: <input type="text" name="T1" size="34">
Address: <input type="text" name="T2" size="34">
<A href='mailto:me@myisp.net?subject=MySub&body=Inputted Values'>Click to E-Mail</A>

Any help is greatly appreciated.


03-07-2005, 04:29 PM
You could possibly do something like this with JavaScript, but not with HTML alone...

03-07-2005, 04:31 PM
I'd use PHP for that - and as CP stated, HTML will simply not do what you're asking.

HTML is nothing on it's on thesedays.

03-07-2005, 06:31 PM
Yeah. HTML/CSS is just a markup system, for making info look pretty. it is completly static. It can't do anythingonce the page is loaded. You need to use JS or a server-side (PHP,ASP) technology to proces this

Dan :thumbsup:

03-08-2005, 03:20 AM
Can anyone show me a small example using just 1 field ? Something I could build on. Thanks.

It would be greatly appreciated.


03-08-2005, 01:09 PM
[QUOTE=rfhall50] For simplicity, I would really like to keep it confined to just HTML coding.

This is about as simple as I can make it.

I understand simplicity (see my sig :) ). Though I may not fully understand yet why you try to do it this way.

Have you any reason to avoid an online form? I mean from your text fields, you can send them all to your email in box in whatever configuration you choose. And you could have the benefit of removing your email address from the web to avoid spam bots etc. Oh nearly forgot, if you look on keeping it simple for the longer term, I think you'll find it more simple than settling for easy set-up.

my 2c


03-08-2005, 03:49 PM
The biggest reason for confining it to HTML is that is what I know how to use at this point. I have no problem using HTML forms (if thats the forms you are talking about), but don't know how to get them out to email other than the old "mailto".



03-08-2005, 04:09 PM
As stated, the best solution would be a simple form handler built using one of the available server side scripting languages.

This topic was raised recently: see this thread (http://www.codingforums.com/showthread.php?t=53547&highlight=form+handler) for some more info.