Frontpage 2003 & PHP Issue

D

dredge

Hi Guys, I upgraded from Frontpage XP to Frontpage 2003 and am having a
problem with FP2003 changing my PHP code. Here is an example:

Original Code:
value="<?if($post_data=="1"){echo $first_name;}?>"

After opening it in FP2003:
value="&lt;?if($post_data==&quot;1&quot;){echo $first_name;}?&gt;"?>"

I found that using <SCRIPT language="PHP">...</SCRIPT> instead of
<?...?> resolves this issue, but I need to use the ASP tags because my
exisitng codebase of 20k+ lines of PHP code use them, and they allow me
to code a lot faster (it's faster to type <? and ?>).

Any help on this issue would be deeply appreciated.

Thanks,

-Karl
 
D

dredge

Thank you for your reply. The webserver we use has already been setup
to utilize ASP tags. It also accepts the "<SCRIPT
language="PHP">...</SCRIPT>" tag, but again I would prefer to use the
ASP tags if at all possible. This issue really confuses me because I
thought FP doesn't ever change code that is between ASP tags.
 
R

Ronx

From your original post:

I found that using <SCRIPT language="PHP">...</SCRIPT> instead of
<?...?> resolves this issue, but I need to use the ASP tags because my
existing codebase of 20k+ lines of PHP code use them, and they allow
me
to code a lot faster (it's faster to type <? and ?>).

<? ... ?> are not ASP tags - they are PHP specific. ASP tags are <%
.... %>
The PHP.ini file on the server needs to be configured to use ASP
tags - and FP does not change code using these, unless the code is
badly formed.
Badly formed code includes:
Table opened in HTML and closed in code.
Table opened in code and closed in HTML
and similar.
 
D

dredge

Ron, thanks for the reply- I think you found the issue. I changed this
code:

value="<?if($post_data=="1"){echo $first_name;}?>"

to this (note the quotes around the number one):

value="<?if($post_data=='1'){echo $first_name;}?>"

After the change, FP2003 doesn't change my code. FP2002 (XP) did not
care if double-quotes were used, but it looks like FP2003 does.
Unfortunately, all of my existing php code uses double-quotes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top