ma************@ gmail.com wrote:
I have an "Update Customer" form that doesn't work as .xhtml. Here's
where it stops working:
<input type="text" name="ud_first" id="ud_first"
value="<? echo "$first"?>" />
-------^
When the browser hits the < after value,
As explained it shouldn't hit that. Your php code will be useless at least.
it thinks I'm starting
another tag before I finish my input tag. Fair enough. I switch the
<'s for $lt; and then it stops here:
<input type="text" name="ud_first" id="ud_first"
value="<? echo "$first"?&g t;" />
-------------------^
Switching the $ to $ doesn't help.
Well, encoding the " would be more rewarding, but still your php is
useless.
About the php: Why put <? echo "$first";?? ??? <? echo $first; ?(or even
better <?php echo $first; ?>) seems more appropriate to put it lightly.
I can get this page to work if I change it to a .php file instead of
.xhtml. That can't be my only option?!?
Nope. You will have to parse it as php offcourse, or remove the
php-snippets from the code. You've got the very unattractive option to tell
your web server to parse every .html, .xhtml, or .whatsinaname through php,
but it will result in a large unwanted overhead and load on the server, not
to mention it's hardly portable. Possible, but I'd strongly advise against
it.
A better question is: why do you want the .xhtml extension? If it's just
about 'friendlier' urls: the actual filenames can have very little to do
with the urls. Look at mod_rewrite for apache and the like.
--
Rik Wasmus