hi gurus
i've got this small problem with this HTML form, that the PHP code is appearing unintentionally.
Does any1 know how to hide it?
thanx,georgehowell
html form with some PHP
Moderator: General Moderators
- phdatabase
- Forum Commoner
- Posts: 83
- Joined: Fri May 28, 2010 10:02 am
- Location: Fort Myers, FL
Re: html form with some PHP
First guess, the page is still an .html extension (page.html)? If so, change it to .php (page.php). Either that or no php on the server - NOT likely. For whatever reason the php interpreter is not being called. Being able to see the code would help.
Re: html form with some PHP
Hey,
Not a guru here. New to this myself but I was having the same affect when having php tag inside a php tag so just in case it may be the same issue.
Wrong way:
Right way:
This may be obvious to you but it wasn't to me so I guess it's worth mentioning.
Not a guru here. New to this myself but I was having the same affect when having php tag inside a php tag so just in case it may be the same issue.
Wrong way:
Code: Select all
<?php
$var = 'some text';
<input type="text" value="<?php echo $var; ?>" />
?>
Code: Select all
<?php
$var = 'some text';
?>
<!--notice php closing tag above so this isn't a php inside a php
<input type="text" value="<?php echo $var; ?>" />
<?php
//more php code if you need it
?>
- phdatabase
- Forum Commoner
- Posts: 83
- Joined: Fri May 28, 2010 10:02 am
- Location: Fort Myers, FL
Re: html form with some PHP
Yup, that'll do it too.