In attempting to make a FORM as user friendly as possible, I have used the "str-replace" function to replace the spaces of some of the form submissions with a "-" and then also with a "_". These new variables I then want to insert into a template html doc.
(My form is using a POST method)
How I am trying to get this to work specifically is like so:
User enters a keyword phrase into form, and upon pressing submit they are given the html code for a new page which will have taken the keyword phrases they entered and placed those same phrases into a hyphenated form and then an underscored form for the names of GIF files and HTML docs.
This is the code for the keywords--
<font face="Arial" size="2">Keyword 10:</font> <br><input type="text" name="kwp10"
size="50"><br>
<img src="images/px.gif" width="1" height="15" border="0"><br>
<?php
$kwpgif10 = (str_replace(" ","-",$kwp10));
$kwphtml10 = (str_replace(" ","_",$kwp10));
?>
kwp10 being the name of this particular FORM input and $kwpgif10 and $kwphtml10 the names I have referred to in the html template file.
<img width="32" height="32" src="<?php echo $kwpgif10;?>.gif" alt="<?php echo $kwp10;?>">
<a href="<?php echo $site;?>/<?php echo $kwphtml10;?>"><?php echo $kwp10;?></a><br>
I am able to get the $kwp10 parsed correctly into the html doc (this is one of the "input" boxes of the form) , however $kwpgif10 and $kwphtml are not parsed all.
I have also tried to make the kwpgif's and kwphtml's into hidden inputs with the str_replace code as the "value", but that doesn't work either.
I have searched on this forum and have gone to the php manual, but since I am new to this I really don't know what to search for.
I hope that this is understandable...I've only been working with php for a short time.
Thanks for any help!
Bernadette