PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
reyes99
Forum Commoner
Posts: 38 Joined: Tue May 22, 2007 10:35 pm
Post
by reyes99 » Wed Nov 26, 2008 4:07 pm
Hi Everyone,
I keep getting my PHP code " <?=$_POST[email]?> " showing up inside my field when I run my form in my browser.
What could be causing this??
Code: Select all
<p align="center">E-Mail Address:</td>
<td><p align="center">
<input type="text" name="email" value="<?=$_POST[email]?>">
<font color="#FF0000">* required</font></td>
Thanks in advance
Ralph
Attachments
screenshot form.JPG (18.76 KiB) Viewed 138 times
Syntac
Forum Contributor
Posts: 327 Joined: Sun Sep 14, 2008 7:59 pm
Post
by Syntac » Wed Nov 26, 2008 4:09 pm
Never, ever use <? or <?=.
reyes99
Forum Commoner
Posts: 38 Joined: Tue May 22, 2007 10:35 pm
Post
by reyes99 » Wed Nov 26, 2008 4:14 pm
what should I use. I am kind of new to PHP...
Thanks
reyes99
Forum Commoner
Posts: 38 Joined: Tue May 22, 2007 10:35 pm
Post
by reyes99 » Wed Nov 26, 2008 4:35 pm
Thanks Syntac,
I found this on google and it worked.
is it ok to use this?
<input type="text" name="email" value="<?php echo $PHP_SELF;?>">
Thanks
Ralph
Syntac
Forum Contributor
Posts: 327 Joined: Sun Sep 14, 2008 7:59 pm
Post
by Syntac » Wed Nov 26, 2008 4:38 pm
Yes, provided you replace $PHP_SELF with whatever your variable is.
reyes99
Forum Commoner
Posts: 38 Joined: Tue May 22, 2007 10:35 pm
Post
by reyes99 » Wed Nov 26, 2008 4:39 pm
Thank you
Syntac
Forum Contributor
Posts: 327 Joined: Sun Sep 14, 2008 7:59 pm
Post
by Syntac » Wed Nov 26, 2008 4:42 pm
Oh, and one more thing...
should be: