using php tags inside echo
Posted: Thu Feb 13, 2003 5:30 am
hi
what i am trying to do should be really simple but i just cant get it to work. I am trying to put a form (which i have working on a .php page but can not get it to repeat correctly) inside an echo command.
i have tried
echo ('<form name="login" method="post" action=" <?php echo $PHP_SELF ?>">
<font class="whiteHeader">
username:
<input type="text" name="username">
<br>
password:
<input type="password" name="user_password">
<br>
<input type="submit" value="submit">
</font>
</form>
');
as well as putting it inside ("") and \ escapes. ending with " . before <?php. but i cannot get it to work. and using herdoc, none of which i can get to run. The problem is the way in which it handles going back into php. Have read the chapters regarding this a couple of times but still cant work out what I am doing wrong. How would solve this? if any one has some code that they have written to do something similar I'm sure I could see what I am doing wrong.
Thanks
Deej
what i am trying to do should be really simple but i just cant get it to work. I am trying to put a form (which i have working on a .php page but can not get it to repeat correctly) inside an echo command.
i have tried
echo ('<form name="login" method="post" action=" <?php echo $PHP_SELF ?>">
<font class="whiteHeader">
username:
<input type="text" name="username">
<br>
password:
<input type="password" name="user_password">
<br>
<input type="submit" value="submit">
</font>
</form>
');
as well as putting it inside ("") and \ escapes. ending with " . before <?php. but i cannot get it to work. and using herdoc, none of which i can get to run. The problem is the way in which it handles going back into php. Have read the chapters regarding this a couple of times but still cant work out what I am doing wrong. How would solve this? if any one has some code that they have written to do something similar I'm sure I could see what I am doing wrong.
Thanks
Deej