Hello tkeyser
I don't understand what you want to set $checkit to.
The effect of
Code:
checkit=size\=\"30\" value\=\"\'\.\$\_POST\[\'tcf_email\'\]
is to set $checkit to
size="30" and to run a command called
value="'.$_POST['tcf_email']
If you want to set $checkit to
size="30" value="'.$_POST['tcf_email']
then you can use
Code:
checkit='size="30" value="'"'.\$_POST['tcf_email']"
This is the concatenation of two quoted strings: the first, in single quotes is
size="30" value=". All characters in it are taken verbatim until the closing single quote. The second, in double quotes, has some characters that have special meaning within double quotes so they re escaped using \.
The best way to see what you have got in $checkit is
Here the single quotes show if there are any leading or trailing whitespace characters in the value of $checkit.
If my assumption about what you want to do is correct we now have what you want in $checkit but you are not out of the woods yet. The "." and "[" characters in $checkit are meaningful to sed. These must be escaped if you want them to be taken literally. I think $checkit must be
size="30" value="'\.$_POST\['tcf_email']
but I'm not certain and can't test.
You could check this by running the sed command manually. Once you are confident you have the right string for $checkit then you can set it in the script. Here's how to do it if my guess was correct
Code:
checkit='size="30" value="'"'\\.\$_POST\\['tcf_email']"
If this doesn't work please post a few lines of sample HTML including the string that you want to change.
Best
Charles