Include ssi in a form?
I would like to include a ssi-file in a form so that I only need to build one file and then copy it x times...
Something like: Code:
<input type="text" name="T1" size="20"><!--#include virtual="T1.txt"--> Code:
<textarea name="T1" cols="20" rows="1"><!--#include virtual="T1.txt"--></textarea> Ex. /my-site/index.html include /my-site/T1.txt and /more/index.html includes /more/T1.txt while the index-file are actually the same - just copied to different directories... How can I write the input/textarea-tag to include the info in the txt-file? The reason to do this is to avoid making sevral index-files, but also to give the user the opportunity to change the input/textarea info and mail it to me with the form/post command... Thanks! |
Just as you've done it.
If you want the text to be the value of the input field then: <input type="text" name="T1" size="20" value="<!--#include virtual="T1.txt"-->"> |
Yepp!
My fault - I forgot a minute that this is a SERVER side command... No wonder it wouldn't work in FrontPage.... Thanks! You would not know how to get a single file printet out? Something like: Code:
<!--#include file="file.txt#line2" --> @ngelot |
...a single LINE in a file....
|
Got help from another guy:
Code:
<!--#exec cmd="grep name text.txt | sed 's/name\ //g'" --> Works fine :-D @ngelot |
All times are GMT -5. The time now is 04:43 AM. |