Frontpage Changing my PHP code

K

Karl

Hi, I just upgraded from Frontpage 2002 to Frontpage 2003 and .php files I
created in 2002 are being changed by Frontpage 2003. Here is what it is
doing:

It changes this:

<input type="text" name="position" value="<?echo $info["Position_Name"]; ?>">

Into this:

<input type="text" name="position" value="<?echo $info["Job_Title"]; ?>">

My "<?" and "?>" tags are automatically being changed to "<?" and "?>",
respectively. Also the quotes are being changed to "&quot".

I never want Frontpage 2003 to automatically change my code. I have turned
off a number of options in the Tools>Page Options section, and elsewhere, and
have not been able to resolve this issue with FP2003.

Any help would be greatly appreciated.
 
K

Karl

Ok, I have to put spaces between the characters to make it show up right on
this forum- here is what FP2003 is changed by "<" characters into: & l t ;
(minus the spaces in between). I think this might be an ASCII character for
the "<" character. Either way, I need for FP not to change my "<" characters
into the ASCII equivalent, and my quotes into "&quot".

Hopefully this is making a little sense! :)

-Karl

<input type="text" name="position" size="30" maxlength="50"
value="&lt;?echo $info4["Job_Title"]; ?>"
 
S

Stefan B Rusynko

1) Make sure you have set up ,php as pages editable by FP in Tools Options Configure Editors
2) then set up your PHP to use ASP type tags
See http://www.totalpconline.com/phprocketaddin/index.php?page=faq.html



| Ok, I have to put spaces between the characters to make it show up right on
| this forum- here is what FP2003 is changed by "<" characters into: & l t ;
| (minus the spaces in between). I think this might be an ASCII character for
| the "<" character. Either way, I need for FP not to change my "<" characters
| into the ASCII equivalent, and my quotes into "&quot".
|
| Hopefully this is making a little sense! :)
|
| -Karl
|
| <input type="text" name="position" size="30" maxlength="50"
| value="&lt;?echo $info4["Job_Title"]; ?>"
|
| "Karl" wrote:
|
| > Hi, I just upgraded from Frontpage 2002 to Frontpage 2003 and .php files I
| > created in 2002 are being changed by Frontpage 2003. Here is what it is
| > doing:
| >
| > It changes this:
| >
| > <input type="text" name="position" value="<?echo $info["Position_Name"]; ?>">
| >
| > Into this:
| >
| > <input type="text" name="position" value="<?echo $info["Job_Title"]; ?>">
| >
| > My "<?" and "?>" tags are automatically being changed to "<?" and "?>",
| > respectively. Also the quotes are being changed to """.
| >
| > I never want Frontpage 2003 to automatically change my code. I have turned
| > off a number of options in the Tools>Page Options section, and elsewhere, and
| > have not been able to resolve this issue with FP2003.
| >
| > Any help would be greatly appreciated.
 
K

Karl

Here's a snippet from that totalpconline site:

===
Q. What is the benefit of using ASP style tags when coding PHP in FrontPage?

A. FrontPage will not modify anything between <% and %> period.
===

It is weird, because that is exactly what FP2003 is doing (changing what is
between the <? and ?> tags). The < is changed to "& l t ;" (minus the quotes
and the spaces in between) and the quotes between my <? ?> tags in my code
are being changed into "&quot" (minus the quotes).
 
C

Chris Leeds, MVP-FrontPage

I never liked doing that with the delimiters.

try one of these:

1. set your cursor where you want your php block and hit insert/ web
component/ advanced control/ HTML Mark-Up, and paste your PHP into that
dialog box. FrontPage WILL leave it alone.

2. rather than use <? and ?> just use this:
<script language="php"> and </script> FrontPage will leave this alone too.

for even more "user friendliness" with FrontPage where you can continue to
use FrontPage components like include pages and nav bars etc. you might want
to consider the option of simply running PHP code on HTM/HTML pages. this
is my favorite way to roll when using FrontPage as the editor on PHP pages:
http://contentseed.com/help/files/PHP_as_HTM-HTML.pdf

HTH

--
Chris Leeds,
Microsoft MVP-FrontPage

ContentSeed: great tool for web masters,
a fantastic convenience for site owners.
http://contentseed.com/
--
Karl said:
Here's a snippet from that totalpconline site:

===
Q. What is the benefit of using ASP style tags when coding PHP in FrontPage?

A. FrontPage will not modify anything between <% and %> period.
===

It is weird, because that is exactly what FP2003 is doing (changing what is
between the <? and ?> tags). The < is changed to "& l t ;" (minus the quotes
and the spaces in between) and the quotes between my <? ?> tags in my code
are being changed into "&quot" (minus the quotes).




Stefan B Rusynko said:
1) Make sure you have set up ,php as pages editable by FP in Tools Options Configure Editors
2) then set up your PHP to use ASP type tags
See http://www.totalpconline.com/phprocketaddin/index.php?page=faq.html



| Ok, I have to put spaces between the characters to make it show up right on
| this forum- here is what FP2003 is changed by "<" characters into: & l t ;
| (minus the spaces in between). I think this might be an ASCII character for
| the "<" character. Either way, I need for FP not to change my "<" characters
| into the ASCII equivalent, and my quotes into """.
|
| Hopefully this is making a little sense! :)
|
| -Karl
|
| <input type="text" name="position" size="30" maxlength="50"
| value="<?echo $info4["Job_Title"]; ?>"
|
| "Karl" wrote:
|
| > Hi, I just upgraded from Frontpage 2002 to Frontpage 2003 and .php files I
| > created in 2002 are being changed by Frontpage 2003. Here is what it is
| > doing:
| >
| > It changes this:
| >
| > <input type="text" name="position" value="<?echo $info["Position_Name"]; ?>">
| >
| > Into this:
| >
| > <input type="text" name="position" value="<?echo $info["Job_Title"]; ?>">
| >
| > My "<?" and "?>" tags are automatically being changed to "<?" and "?>",
| > respectively. Also the quotes are being changed to """.
| >
| > I never want Frontpage 2003 to automatically change my code. I have turned
| > off a number of options in the Tools>Page Options section, and elsewhere, and
| > have not been able to resolve this issue with FP2003.
| >
| > Any help would be greatly appreciated.
 
R

Ronx

"FrontPage will not modify anything between <% and %> period. "
And that is true.

However, you are not using <% and %>, you are using <? and ?>, which
FrontPage does not understand.

--
Ron Symonds (Microsoft MVP - FrontPage)
Reply only to group - emails will be deleted unread.


Karl said:
Here's a snippet from that totalpconline site:

===
Q. What is the benefit of using ASP style tags when coding PHP in
FrontPage?

A. FrontPage will not modify anything between <% and %> period.
===

It is weird, because that is exactly what FP2003 is doing (changing what
is
between the <? and ?> tags). The < is changed to "& l t ;" (minus the
quotes
and the spaces in between) and the quotes between my <? ?> tags in my code
are being changed into "&quot" (minus the quotes).




Stefan B Rusynko said:
1) Make sure you have set up ,php as pages editable by FP in Tools
Options Configure Editors
2) then set up your PHP to use ASP type tags
See http://www.totalpconline.com/phprocketaddin/index.php?page=faq.html



| Ok, I have to put spaces between the characters to make it show up
right on
| this forum- here is what FP2003 is changed by "<" characters into: & l
t ;
| (minus the spaces in between). I think this might be an ASCII
character for
| the "<" character. Either way, I need for FP not to change my "<"
characters
| into the ASCII equivalent, and my quotes into """.
|
| Hopefully this is making a little sense! :)
|
| -Karl
|
| <input type="text" name="position" size="30" maxlength="50"
| value="<?echo $info4["Job_Title"]; ?>"
|
| "Karl" wrote:
|
| > Hi, I just upgraded from Frontpage 2002 to Frontpage 2003 and .php
files I
| > created in 2002 are being changed by Frontpage 2003. Here is what it
is
| > doing:
| >
| > It changes this:
| >
| > <input type="text" name="position" value="<?echo
$info["Position_Name"]; ?>">
| >
| > Into this:
| >
| > <input type="text" name="position" value="<?echo $info["Job_Title"];
?>">
| >
| > My "<?" and "?>" tags are automatically being changed to "<?" and
"?>",
| > respectively. Also the quotes are being changed to """.
| >
| > I never want Frontpage 2003 to automatically change my code. I have
turned
| > off a number of options in the Tools>Page Options section, and
elsewhere, and
| > have not been able to resolve this issue with FP2003.
| >
| > Any help would be greatly appreciated.
 

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