FrontPage 2003 + PHP Code

W

Will

Hi, I have a FrontPage shopping cart that was written in PHP. When I edit a
PHP page (configured FrontPage to be the default HTML editor for it) it works
fine except when I save the page.

It seems the PHP page has some hidden form fields in there and any time I
save the page with FP the code is rewritten like this:

<input type="hidden" name="thetime" value="<?= $session["ordertime"] ?>" ?>"
?>">

So what FrontPage is doing is adding the extra ?>" everytime I save the
page. If I save it 10 times, then I will see ?>" 10 times on the same field.
I've disabled all of the code formatting and re-writing rules (optimize) but
it doesn't seem to have an affect on it.

Suggestions?
 
J

Jose Carlos

Hello Will!
Quizás deberías recordar que PHP es un lenguaje para programar del lado del
servidor. Las órdenes que te modifica el programa son las que corresponden a
acciones en el servidor. Intenta instalar MyPHP en tu terminal y ejecuta la
página desde allí. Así puede que te funcione..
Un saludo!

"Will" escribió:
 
C

Chris Leeds, MVP-FrontPage

While I can't tell you exactly why FrontPage is behaving this way for you I
can make a suggestion to stop it:

your line:
<input type="hidden" name="thetime" value="<?= $session["ordertime"] ?>

could be modified to look like this:
<input type="hidden" name="thetime" value="<script language="php"> =
$session["ordertime"] </script>

by replacing the PHP delimiters (<? and ?>) with <script language="php"> and
</script> you'll "protect" it from FrontPage messing with it.

HTH

--
Chris Leeds,
Microsoft MVP-FrontPage

ContentSeed: great tool for web masters,
a fantastic convenience for site owners.
http://contentseed.com/
 
W

Will

Yeah, I attempted to use that code but it still doesn't work. FrontPage is
tricked into thinking that this is a script but the code is not parsed in the
browser now.

Chris Leeds said:
While I can't tell you exactly why FrontPage is behaving this way for you I
can make a suggestion to stop it:

your line:
<input type="hidden" name="thetime" value="<?= $session["ordertime"] ?>

could be modified to look like this:
<input type="hidden" name="thetime" value="<script language="php"> =
$session["ordertime"] </script>

by replacing the PHP delimiters (<? and ?>) with <script language="php"> and
</script> you'll "protect" it from FrontPage messing with it.

HTH

--
Chris Leeds,
Microsoft MVP-FrontPage

ContentSeed: great tool for web masters,
a fantastic convenience for site owners.
http://contentseed.com/
--
Will said:
Hi, I have a FrontPage shopping cart that was written in PHP. When I edit a
PHP page (configured FrontPage to be the default HTML editor for it) it works
fine except when I save the page.

It seems the PHP page has some hidden form fields in there and any time I
save the page with FP the code is rewritten like this:

<input type="hidden" name="thetime" value="<?= $session["ordertime"] ?>" ?>"
?>">

So what FrontPage is doing is adding the extra ?>" everytime I save the
page. If I save it 10 times, then I will see ?>" 10 times on the same field.
I've disabled all of the code formatting and re-writing rules (optimize) but
it doesn't seem to have an affect on it.

Suggestions?
 
S

Stefan B Rusynko

See user instructions on ASP style tags at
http://www.microsoft.com/frontpage/downloads/addin/searchdetail.asp?a=71




| Yeah, I attempted to use that code but it still doesn't work. FrontPage is
| tricked into thinking that this is a script but the code is not parsed in the
| browser now.
|
| "Chris Leeds, MVP-FrontPage" wrote:
|
| > While I can't tell you exactly why FrontPage is behaving this way for you I
| > can make a suggestion to stop it:
| >
| > your line:
| > <input type="hidden" name="thetime" value="<?= $session["ordertime"] ?>
| >
| > could be modified to look like this:
| > <input type="hidden" name="thetime" value="<script language="php"> =
| > $session["ordertime"] </script>
| >
| > by replacing the PHP delimiters (<? and ?>) with <script language="php"> and
| > </script> you'll "protect" it from FrontPage messing with it.
| >
| > HTH
| >
| > --
| > Chris Leeds,
| > Microsoft MVP-FrontPage
| >
| > ContentSeed: great tool for web masters,
| > a fantastic convenience for site owners.
| > http://contentseed.com/
| > --
| > | > > Hi, I have a FrontPage shopping cart that was written in PHP. When I edit
| > a
| > > PHP page (configured FrontPage to be the default HTML editor for it) it
| > works
| > > fine except when I save the page.
| > >
| > > It seems the PHP page has some hidden form fields in there and any time I
| > > save the page with FP the code is rewritten like this:
| > >
| > > <input type="hidden" name="thetime" value="<?= $session["ordertime"] ?>"
| > ?>"
| > > ?>">
| > >
| > > So what FrontPage is doing is adding the extra ?>" everytime I save the
| > > page. If I save it 10 times, then I will see ?>" 10 times on the same
| > field.
| > > I've disabled all of the code formatting and re-writing rules (optimize)
| > but
| > > it doesn't seem to have an affect on it.
| > >
| > > Suggestions?
| >
| >
| >
 
W

Will

Yes, I used ASP Styled tags for PHP and that resolved the issue. The only
thing I had to do was to override the PHP server settings with the .htaccess
file since ASP style weren't enabled in PHP.ini.

Thanks!
 
C

Chris Leeds, MVP-FrontPage

that php code isn't parsed in the browser (at least it shouldn't be).

if you're sure you've done it right try this;
go into code view and pick up that whole form, then back in design view set
your cursor where you want the form to go, hit insert/ web component/
advanced control/ HTML, and paste the code into that dialog box. FrontPage
WILL leave it alone.

HTH

--
Chris Leeds,
Microsoft MVP-FrontPage

ContentSeed: great tool for web masters,
a fantastic convenience for site owners.
http://contentseed.com/
--
Will said:
Yeah, I attempted to use that code but it still doesn't work. FrontPage is
tricked into thinking that this is a script but the code is not parsed in the
browser now.

Chris Leeds said:
While I can't tell you exactly why FrontPage is behaving this way for you I
can make a suggestion to stop it:

your line:
<input type="hidden" name="thetime" value="<?= $session["ordertime"] ?>

could be modified to look like this:
<input type="hidden" name="thetime" value="<script language="php"> =
$session["ordertime"] </script>

by replacing the PHP delimiters (<? and ?>) with <script language="php"> and
</script> you'll "protect" it from FrontPage messing with it.

HTH

--
Chris Leeds,
Microsoft MVP-FrontPage

ContentSeed: great tool for web masters,
a fantastic convenience for site owners.
http://contentseed.com/
--
Will said:
Hi, I have a FrontPage shopping cart that was written in PHP. When I
edit
a
PHP page (configured FrontPage to be the default HTML editor for it)
it
works
fine except when I save the page.

It seems the PHP page has some hidden form fields in there and any time I
save the page with FP the code is rewritten like this:

<input type="hidden" name="thetime" value="<?= $session["ordertime"]
?>"
?>"
?>">

So what FrontPage is doing is adding the extra ?>" everytime I save the
page. If I save it 10 times, then I will see ?>" 10 times on the same field.
I've disabled all of the code formatting and re-writing rules
(optimize)
but
it doesn't seem to have an affect on it.

Suggestions?
 

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