frontpage with php

F

Fred

1. is there a way to display php pages with frontpage?
(without publishing)?

2.can someone tell me why i am getting a parse error on
this code? i am trying to display the email row as links
with subect lines... i know the error is in that part of
it. thanks!!!

<?php
echo "<TABLE BORDER=\"0\" width=\"100%\">\n";
echo "<TR bgcolor=\"white\"><TD>Last Name</TD><TD>First
Name</TD><TD>Email Address</TD><TD>Year
Graduated</TD></TR>\n";
for($i = 0; $i < $numofrows; $i++) {
$row = mysql_fetch_array($result); //get a row from
our result set
if($i % 2) { //this means if there is a remainder
echo "<TR bgcolor=\"white\">\n";
} else { //if there isn't a remainder we will do the
else
echo "<TR bgcolor=\"#E9E9E9\">\n";
}
echo "<TD>".$row['Last_Name']."</TD><TD>".$row
['First_Name']."</TD><TD>"<a href=\"mailto:".$rows
['Email_Address']."?subject=please email me\">".$rows
['Email_Address']."</a>";</TD><TD>".$row
['Year_Graduated']."</TD>\n";
echo "</TR>\n";
}
//now let's close the table and be done with it
echo "</TABLE>\n";
?>
 
T

Thomas A. Rowe

No.

You would have to a local server, with the PHP engine, then you would view in your browser.

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
R

Ronx

Your parse errors are in these snippets:
['First_Name']."</TD><TD>"<a href=\"mailto:".$rows
Should be:
['First_Name']."</TD><TD><a href=\"mailto:".$rows
and
['Email_Address']."</a>";</TD><TD>".$row
should be:
['Email_Address']."</a></TD><TD>".$row
 
D

David Baxter

While we're on the subject of php and FrontPage, I currently have my php
files set to open in Notepad, even when opened from FrontPage. This was
done to avoid having things added by FrontPage that might corrupt the
php coding, but I have no idea whether that was a real worry or just me
being a worry-wart.

Are there any potential problems with using the FrontPage editor to edit
php files?
 
C

Cheryl Wise

Which version of FrontPage?

--
Cheryl D. Wise
MS-MVP-FrontPage
(e-mail address removed)


David Baxter said:
While we're on the subject of php and FrontPage, I currently have my php
files set to open in Notepad, even when opened from FrontPage. This was
done to avoid having things added by FrontPage that might corrupt the
php coding, but I have no idea whether that was a real worry or just me
being a worry-wart.

Are there any potential problems with using the FrontPage editor to edit
php files?


Fred said:
1. is there a way to display php pages with frontpage?
(without publishing)?

2.can someone tell me why i am getting a parse error on
this code? i am trying to display the email row as links
with subect lines... i know the error is in that part of
it. thanks!!!

<?php
echo "<TABLE BORDER=\"0\" width=\"100%\">\n";
echo "<TR bgcolor=\"white\"><TD>Last Name</TD><TD>First
Name</TD><TD>Email Address</TD><TD>Year
Graduated</TD></TR>\n";
for($i = 0; $i < $numofrows; $i++) {
$row = mysql_fetch_array($result); //get a row from
our result set
if($i % 2) { //this means if there is a remainder
echo "<TR bgcolor=\"white\">\n";
} else { //if there isn't a remainder we will do the
else
echo "<TR bgcolor=\"#E9E9E9\">\n";
}
echo "<TD>".$row['Last_Name']."</TD><TD>".$row
['First_Name']."</TD><TD>"<a href=\"mailto:".$rows
['Email_Address']."?subject=please email me\">".$rows
['Email_Address']."</a>";</TD><TD>".$row
['Year_Graduated']."</TD>\n";
echo "</TR>\n";
}
//now let's close the table and be done with it
echo "</TABLE>\n";
?>
 
J

Joe Rohn

Hi David,

Although I don't code with PHP..I thought I heard that any problems related
to editing PHP with FrontPage were corrected in FP2003.

--
Joe

Forum Crafters:
http://www.forumcrafters.com
FrontPage Users Forums:
http://www.timeforweb.com/frontpage

David Baxter said:
While we're on the subject of php and FrontPage, I currently have my php
files set to open in Notepad, even when opened from FrontPage. This was
done to avoid having things added by FrontPage that might corrupt the
php coding, but I have no idea whether that was a real worry or just me
being a worry-wart.

Are there any potential problems with using the FrontPage editor to edit
php files?


Fred said:
1. is there a way to display php pages with frontpage?
(without publishing)?

2.can someone tell me why i am getting a parse error on
this code? i am trying to display the email row as links
with subect lines... i know the error is in that part of
it. thanks!!!

<?php
echo "<TABLE BORDER=\"0\" width=\"100%\">\n";
echo "<TR bgcolor=\"white\"><TD>Last Name</TD><TD>First
Name</TD><TD>Email Address</TD><TD>Year
Graduated</TD></TR>\n";
for($i = 0; $i < $numofrows; $i++) {
$row = mysql_fetch_array($result); //get a row from
our result set
if($i % 2) { //this means if there is a remainder
echo "<TR bgcolor=\"white\">\n";
} else { //if there isn't a remainder we will do the
else
echo "<TR bgcolor=\"#E9E9E9\">\n";
}
echo "<TD>".$row['Last_Name']."</TD><TD>".$row
['First_Name']."</TD><TD>"<a href=\"mailto:".$rows
['Email_Address']."?subject=please email me\">".$rows
['Email_Address']."</a>";</TD><TD>".$row
['Year_Graduated']."</TD>\n";
echo "</TR>\n";
}
//now let's close the table and be done with it
echo "</TABLE>\n";
?>
 
C

chris leeds

I've edited some php files with FrontPage and it's been OK but I remember
hearing all kinds of cautions and even a suggestion to use .asp style tags
(replace the <? and ?> with <% and %>

I'm interested in this (how FrontPage in it's various versions handle php
code) so if anyone has had positive or negative experiences I'd appreciate
hearing. I haven't had any negative experiences with it but maybe I've just
been lucky.


--
The email address on this posting is a "black hole". I got tired of all the
spam.
Please feel free to contact me here:
http://nedp.net/contact/
--


David Baxter said:
While we're on the subject of php and FrontPage, I currently have my php
files set to open in Notepad, even when opened from FrontPage. This was
done to avoid having things added by FrontPage that might corrupt the
php coding, but I have no idea whether that was a real worry or just me
being a worry-wart.

Are there any potential problems with using the FrontPage editor to edit
php files?


Fred said:
1. is there a way to display php pages with frontpage?
(without publishing)?

2.can someone tell me why i am getting a parse error on
this code? i am trying to display the email row as links
with subect lines... i know the error is in that part of
it. thanks!!!

<?php
echo "<TABLE BORDER=\"0\" width=\"100%\">\n";
echo "<TR bgcolor=\"white\"><TD>Last Name</TD><TD>First
Name</TD><TD>Email Address</TD><TD>Year
Graduated</TD></TR>\n";
for($i = 0; $i < $numofrows; $i++) {
$row = mysql_fetch_array($result); //get a row from
our result set
if($i % 2) { //this means if there is a remainder
echo "<TR bgcolor=\"white\">\n";
} else { //if there isn't a remainder we will do the
else
echo "<TR bgcolor=\"#E9E9E9\">\n";
}
echo "<TD>".$row['Last_Name']."</TD><TD>".$row
['First_Name']."</TD><TD>"<a href=\"mailto:".$rows
['Email_Address']."?subject=please email me\">".$rows
['Email_Address']."</a>";</TD><TD>".$row
['Year_Graduated']."</TD>\n";
echo "</TR>\n";
}
//now let's close the table and be done with it
echo "</TABLE>\n";
?>
 
D

David Baxter

FP2002

Cheryl Wise said:
Which version of FrontPage?

--
Cheryl D. Wise
MS-MVP-FrontPage
(e-mail address removed)


David Baxter said:
While we're on the subject of php and FrontPage, I currently have my php
files set to open in Notepad, even when opened from FrontPage. This was
done to avoid having things added by FrontPage that might corrupt the
php coding, but I have no idea whether that was a real worry or just me
being a worry-wart.

Are there any potential problems with using the FrontPage editor to edit
php files?


Fred said:
1. is there a way to display php pages with frontpage?
(without publishing)?

2.can someone tell me why i am getting a parse error on
this code? i am trying to display the email row as links
with subect lines... i know the error is in that part of
it. thanks!!!

<?php
echo "<TABLE BORDER=\"0\" width=\"100%\">\n";
echo "<TR bgcolor=\"white\"><TD>Last Name</TD><TD>First
Name</TD><TD>Email Address</TD><TD>Year
Graduated</TD></TR>\n";
for($i = 0; $i < $numofrows; $i++) {
$row = mysql_fetch_array($result); //get a row from
our result set
if($i % 2) { //this means if there is a remainder
echo "<TR bgcolor=\"white\">\n";
} else { //if there isn't a remainder we will do the
else
echo "<TR bgcolor=\"#E9E9E9\">\n";
}
echo "<TD>".$row['Last_Name']."</TD><TD>".$row
['First_Name']."</TD><TD>"<a href=\"mailto:".$rows
['Email_Address']."?subject=please email me\">".$rows
['Email_Address']."</a>";</TD><TD>".$row
['Year_Graduated']."</TD>\n";
echo "</TR>\n";
}
//now let's close the table and be done with it
echo "</TABLE>\n";
?>
 
D

David Baxter

ahhh... maybe finally a reason to upgrade from FP2002 :blush:)


Joe Rohn said:
Hi David,

Although I don't code with PHP..I thought I heard that any problems related
to editing PHP with FrontPage were corrected in FP2003.

--
Joe

Forum Crafters:
http://www.forumcrafters.com
FrontPage Users Forums:
http://www.timeforweb.com/frontpage

David Baxter said:
While we're on the subject of php and FrontPage, I currently have my php
files set to open in Notepad, even when opened from FrontPage. This was
done to avoid having things added by FrontPage that might corrupt the
php coding, but I have no idea whether that was a real worry or just me
being a worry-wart.

Are there any potential problems with using the FrontPage editor to edit
php files?


Fred said:
1. is there a way to display php pages with frontpage?
(without publishing)?

2.can someone tell me why i am getting a parse error on
this code? i am trying to display the email row as links
with subect lines... i know the error is in that part of
it. thanks!!!

<?php
echo "<TABLE BORDER=\"0\" width=\"100%\">\n";
echo "<TR bgcolor=\"white\"><TD>Last Name</TD><TD>First
Name</TD><TD>Email Address</TD><TD>Year
Graduated</TD></TR>\n";
for($i = 0; $i < $numofrows; $i++) {
$row = mysql_fetch_array($result); //get a row from
our result set
if($i % 2) { //this means if there is a remainder
echo "<TR bgcolor=\"white\">\n";
} else { //if there isn't a remainder we will do the
else
echo "<TR bgcolor=\"#E9E9E9\">\n";
}
echo "<TD>".$row['Last_Name']."</TD><TD>".$row
['First_Name']."</TD><TD>"<a href=\"mailto:".$rows
['Email_Address']."?subject=please email me\">".$rows
['Email_Address']."</a>";</TD><TD>".$row
['Year_Graduated']."</TD>\n";
echo "</TR>\n";
}
//now let's close the table and be done with it
echo "</TABLE>\n";
?>
 
S

Stefan B Rusynko

Yes on the tag syntax (if your PHP engine supports them)
Also you'll find several good free addins for PHP support in FP at
http://www.microsoft.com/frontpage/downloads/addin/default.asp

--




| I've edited some php files with FrontPage and it's been OK but I remember
| hearing all kinds of cautions and even a suggestion to use .asp style tags
| (replace the <? and ?> with <% and %>
|
| I'm interested in this (how FrontPage in it's various versions handle php
| code) so if anyone has had positive or negative experiences I'd appreciate
| hearing. I haven't had any negative experiences with it but maybe I've just
| been lucky.
|
|
| --
| The email address on this posting is a "black hole". I got tired of all the
| spam.
| Please feel free to contact me here:
| http://nedp.net/contact/
| --
|
|
| | > While we're on the subject of php and FrontPage, I currently have my php
| > files set to open in Notepad, even when opened from FrontPage. This was
| > done to avoid having things added by FrontPage that might corrupt the
| > php coding, but I have no idea whether that was a real worry or just me
| > being a worry-wart.
| >
| > Are there any potential problems with using the FrontPage editor to edit
| > php files?
| >
| >
| > | > > 1. is there a way to display php pages with frontpage?
| > > (without publishing)?
| > >
| > > 2.can someone tell me why i am getting a parse error on
| > > this code? i am trying to display the email row as links
| > > with subect lines... i know the error is in that part of
| > > it. thanks!!!
| > >
| > > <?php
| > > echo "<TABLE BORDER=\"0\" width=\"100%\">\n";
| > > echo "<TR bgcolor=\"white\"><TD>Last Name</TD><TD>First
| > > Name</TD><TD>Email Address</TD><TD>Year
| > > Graduated</TD></TR>\n";
| > > for($i = 0; $i < $numofrows; $i++) {
| > > $row = mysql_fetch_array($result); //get a row from
| > > our result set
| > > if($i % 2) { //this means if there is a remainder
| > > echo "<TR bgcolor=\"white\">\n";
| > > } else { //if there isn't a remainder we will do the
| > > else
| > > echo "<TR bgcolor=\"#E9E9E9\">\n";
| > > }
| > > echo "<TD>".$row['Last_Name']."</TD><TD>".$row
| > > ['First_Name']."</TD><TD>"<a href=\"mailto:".$rows
| > > ['Email_Address']."?subject=please email me\">".$rows
| > > ['Email_Address']."</a>";</TD><TD>".$row
| > > ['Year_Graduated']."</TD>\n";
| > > echo "</TR>\n";
| > > }
| > > //now let's close the table and be done with it
| > > echo "</TABLE>\n";
| > > ?>
| >
| >
|
|
 
J

Jack Brewster

I vote no on using the ASP style tag delimiters. It could seriously hamper
the portability of your code. Moving from one host to another could become
more of a hassle, for example. I also don't use the short style <? ?> for
the same reason. Using the default tags <?php ?> means you won't have to
perform a bunch of search and replace just to move your code to a new
server. It also provides for XML conformance if that is important to you.
See:
http://us4.php.net/manual/en/language.basic-syntax.php

--
Jack Brewster - Microsoft FrontPage MVP

Stefan B Rusynko said:
Yes on the tag syntax (if your PHP engine supports them)
Also you'll find several good free addins for PHP support in FP at
http://www.microsoft.com/frontpage/downloads/addin/default.asp

--




| I've edited some php files with FrontPage and it's been OK but I remember
| hearing all kinds of cautions and even a suggestion to use .asp style tags
| (replace the <? and ?> with <% and %>
|
| I'm interested in this (how FrontPage in it's various versions handle php
| code) so if anyone has had positive or negative experiences I'd appreciate
| hearing. I haven't had any negative experiences with it but maybe I've just
| been lucky.
|
|
| --
| The email address on this posting is a "black hole". I got tired of all the
| spam.
| Please feel free to contact me here:
| http://nedp.net/contact/
| --
|
|
| | > While we're on the subject of php and FrontPage, I currently have my php
| > files set to open in Notepad, even when opened from FrontPage. This was
| > done to avoid having things added by FrontPage that might corrupt the
| > php coding, but I have no idea whether that was a real worry or just me
| > being a worry-wart.
| >
| > Are there any potential problems with using the FrontPage editor to edit
| > php files?
| >
| >
| > | > > 1. is there a way to display php pages with frontpage?
| > > (without publishing)?
| > >
| > > 2.can someone tell me why i am getting a parse error on
| > > this code? i am trying to display the email row as links
| > > with subect lines... i know the error is in that part of
| > > it. thanks!!!
| > >
| > > <?php
| > > echo "<TABLE BORDER=\"0\" width=\"100%\">\n";
| > > echo "<TR bgcolor=\"white\"><TD>Last Name</TD><TD>First
| > > Name</TD><TD>Email Address</TD><TD>Year
| > > Graduated</TD></TR>\n";
| > > for($i = 0; $i < $numofrows; $i++) {
| > > $row = mysql_fetch_array($result); //get a row from
| > > our result set
| > > if($i % 2) { //this means if there is a remainder
| > > echo "<TR bgcolor=\"white\">\n";
| > > } else { //if there isn't a remainder we will do the
| > > else
| > > echo "<TR bgcolor=\"#E9E9E9\">\n";
| > > }
| > > echo "<TD>".$row['Last_Name']."</TD><TD>".$row
| > > ['First_Name']."</TD><TD>"<a href=\"mailto:".$rows
| > > ['Email_Address']."?subject=please email me\">".$rows
| > > ['Email_Address']."</a>";</TD><TD>".$row
| > > ['Year_Graduated']."</TD>\n";
| > > echo "</TR>\n";
| > > }
| > > //now let's close the table and be done with it
| > > echo "</TABLE>\n";
| > > ?>
| >
| >
|
|
 

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