Linkbars for PHP page in FP 2003 not working

P

pb

I have a PHP page in Frontpage. The link bar doesn't seem to be working in
the PHP page. DO navigational link bars work with in PHP Frontpage pages?
Here is the code for the page. It should work at the "NAVIGATION BAR" line
if you look below at the code, but it doesn't.

<?php

// '$empty_fields_message' and '$thankyou_message' can be changed if you wish.

// Change to your own email address
$your_email = "(e-mail address removed)";
//$your_email = "(e-mail address removed)";

// This is what is displayed in the email subject line
$subject = "Put your subject here";

// This is displayed if all the fields are not filled in
$empty_fields_message = "<p>Please go back and complete all the fields in
the form.</p>";

// This is displayed when the email has been sent
$thankyou_message = "<p>Thank you. Your message has been sent(How'd ya like
dem apples!!!)</p>";

// You do not need to edit below this line

// Assign form data to variable and strip any slashes
$name = stripslashes($_POST['txtName']);
$email = stripslashes($_POST['txtEmail']);
$message = stripslashes($_POST['txtMessage']);

// Has user entered their name - if not display the form
if (!isset($_POST['txtName'])) {

?>


<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>ABIS Inc. - Advanced Business Information Solutions - Contact
Us</title>
<link rel="stylesheet" type="text/css" href="images/include/style.css">


<style type="text/css">
a:link {text-decoration: none}
a:active {text-decoration: none}
a:visited {text-decoration: none}
a:hover {text-decoration: none}
</style>

<meta name="Microsoft Theme" content="ice152 011, default">
</head>

<body>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%" height="81">
<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000"
id="ShockwaveFlash1" width="450" height="75"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0">
<param name="_cx" value="11906">
<param name="_cy" value="1984">
<param name="FlashVars" value>
<param name="Movie" value="flash/logoflash.swf">
<param name="Src" value="flash/logoflash.swf">
<param name="WMode" value="Window">
<param name="Play" value="-1">
<param name="Loop" value="-1">
<param name="Quality" value="High">
<param name="SAlign" value>
<param name="Menu" value="-1">
<param name="Base" value>
<param name="AllowScriptAccess" value="always">
<param name="Scale" value="ShowAll">
<param name="DeviceFont" value="0">
<param name="EmbedMovie" value="0">
<param name="BGColor" value>
<param name="SWRemote" value>
<param name="MovieData" value>
<param name="SeamlessTabbing" value="1">
<embed src="flash/logoflash.swf" quality="high"
bgcolor="#FFFFFF" WIDTH="450" HEIGHT="75"
TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></object>
</td>
<td rowspan="2">
<table border="0" cellpadding="0" cellspacing="0" width="297"
height="103">
<tr>
<td width="100%" height="24" align="center"><a
href="products.htm"><font color="#003366">Buy Now</font></a><font
color="#336699"> </font> |
<a href="contact.htm"><font size="2" color="#003366">Contact
Us</font></a></td>
</tr>
<tr>
<td width="100%" background="images/tpbg.gif" height="78">
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH=297 HEIGHT=79>
<PARAM NAME=movie VALUE="flash/movie.swf">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=bgcolor VALUE=#FFFFFF>
<EMBED src="flash/movie.swf" quality=high bgcolor=#FFFFFF WIDTH=297
HEIGHT=79 TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
</EMBED></OBJECT>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="topline" height="22" bgcolor="#5C8CB8"> <i><font
color="#FFFFFF">Providing
Cost Effective Solutions For Small Businesses ...</font></i></td>
</tr>
</table>

<table border="0" cellpadding="0" cellspacing="0" width="100%"
bgcolor="#003366">
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" width="166"
height="25" background="images/corner1.gif">
<tr>
<td valign="bottom"><b><font color="#FFFFFF"> NAVIGATION
MENU</font></b></td>
</tr>
</table>
</td>
<td width="100%" align="right">
<p align="center">
<!--webbot bot="Navigation" S-Orientation="horizontal"
S-Rendering="graphics" S-Type="global" B-Include-Home="FALSE"
B-Include-Up="FALSE" U-Page S-Target --></p>
</td>
</tr>
</table>

<table border="0" cellpadding="0" cellspacing="0" width="100%" height="80%">
<tr>
<td bgcolor="#336699"> </td>
<td class="cellpadding" height="22" bgcolor="#5C8CB8">
<!--webbot bot="Navigation" S-Type="banner" S-Orientation="horizontal"
S-Rendering="graphics" B-Include-Home B-Include-Up U-Page S-Target --></td>
<td><img border="0" src="images/corner2.gif" width="172" height="22"></td>
</tr>
<tr>
<td width="166" valign="top" bgcolor="#336699">
<p align="center">
<!--webbot bot="Navigation" S-Orientation="vertical"
S-Rendering="graphics" S-Type="top" B-Include-Home="TRUE"
B-Include-Up="FALSE" U-Page S-Target --><p align="left">
<p align="left">
</td>
<td class="cellpadding" width="100%" valign="top" height="100%"><p> </p>
<p><b><font size="2">ABIS
Contact Information</font></b></p>
<p><font size="1">If you have any questions regarding our products,
services or company, please contact us at:</font></p>

<p>...................................................................................................</p>
<p><b>Telephone:</b></p>
<p> 703-455-2009</p>
<p> </p>
<p><b>Fax:</b></p>
<p> 270-633-4227</p>
<p> </p>
<p><b>Hours</b></p>
<p><b> </b>M-F 8:00am - 4:30pm EST</p>
<p> </p>
<p><b>Postal Address:</b></p>
<p> <span lang="en-gb">To request postal
address, please fill out the form below.</span></p>
<p> </p>
<p><b>Product Sales: </b><a href="mailto:sales@">[email protected]</a></p>
<p><b>Consulting Services: </b><a
href="mailto:consulting@">[email protected]</a></p>
<p><b>General Information:</b> <a
href="mailto:info@">[email protected]</a></p>
<p> </p>
<hr>
<p> </p>
<p>Send Us a Message:</p>
<form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
<fieldset>
<legend>Please complete the form in FULL</legend>
<p><label for="txtName">Name:</label><br />
<input type="text" title="Enter your name" name="txtName"
value="<?php if (isset($_POST['txtName'])) echo $_POST['txtName']; ?>"
size="20" /></p>

<p><label for="txtEmail">Email Address:</label><br />
<input type="text" title="Enter your email address" name="txtEmail"
value="<?php if (isset($_POST['txtEmail'])) echo $_POST['txtEmail']; ?>"
size="20" /></p>

<p><label for="txtMessage">Enter your message:</label><br />
<textarea rows="3" cols="50" title="Enter your message" name="txtMessage"
value="<?php if (isset($_POST['txtMessage'])) echo $_POST['txtMessage'];
?>"></textarea></p>

<p><label title="Send your message">
<input type="submit" value="Send" /></label></p>
</fieldset>
</form>
</td>
<td class="newsbox" valign="top" bgcolor="#336699" width="172">
<table border="0" cellpadding="2" cellspacing="0" width="164">
<tr>
<td bgcolor="#F7BC5B">
<img border="0" src="images/pages.gif" align="middle"
width="11" height="13"> <b>News Box</b></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><font size="1"> Consumers primarily
abandon Web sites because they have customer service questions or pricing
issues. Post-visit communications offer an efficient means to personalize
online customer service without resorting to expensive and unproven site-side
personalization.
</font><i><font size="1">Jupiter Research.</font></i>
</td>
</tr>
</table>
<p> </p>
<table border="0" cellpadding="2" cellspacing="0" width="164">
<tr>
<td bgcolor="#F7BC5B"> <b>
<img border="0" src="images/pages.gif" align="middle"
width="11" height="13">
Question...</b></td>
</tr>
<tr>
<td bgcolor="#FFFFFF">What is your preferred method of obtaining
product information?<br>
<form method="POST" name="Information?"
action="--WEBBOT-SELF--"
onSubmit="location.href='_derived/nortbots.htm';return false;"
WEBBOT-onSubmit>
<!--webbot bot="SaveResults" s-email-format="TEXT/PRE"
s-email-address="(e-mail address removed)" b-email-label-fields="TRUE"
b-email-subject-from-field="TRUE" s-email-subject="Information Answer Form"
s-builtin-fields startspan --><strong>[FrontPage Save Results
Component]</strong><!--webbot bot="SaveResults" endspan i-checksum="6561" -->
<p><input type="radio" name="R1" value="Website"
checked>Website?</p>
<p><input type="radio" name="R1" value="E-Mail">E-Mail?</p>
<p><input type="radio" name="R1" value="Phone">Phone?</p>
<p><input type="radio" name="R1" value="Fax">Fax?</p>
<p> </p>
<p><input type="submit" value="Submit" name="Submit"></p>
</form>
</td>
</tr>
</table>
<p> </p>
<p> </p>
</td>
</tr>
<tr>
<td bgcolor="#003366"><img border="0" src="images/space.gif"
width="166" height="1"></td>
<td bgcolor="#003366" height="24" align="center">
<!--webbot bot="Navigation" S-Orientation="horizontal"
S-Rendering="graphics" S-Type="arrows" B-Include-Home="TRUE"
B-Include-Up="TRUE" U-Page S-Target --></td>
<td bgcolor="#003366"><img border="0" src="images/space.gif"
width="170" height="1"></td>
</tr>
</table>

<p> </p>
<!--webbot bot="Include" U-Include="images/include/copyright.htm"
TAG="BODY" -->

<p> </p>
<?php

}

elseif (empty($name) || empty($email) || empty($message)) {

echo $empty_fields_message;

}

else {

// Stop the form being used from an external URL

//Get the referring URL
$referer = $_SERVER['HTTP_REFERER'];

// Get the URL of this page
$this_url = "http://".$_SERVER['HTTP_HOST'].$_SERVER["REQUEST_URI"];
// If the referring URL and the URL of this page don't match then
// display a message and don't send the email.
if ($referer != $this_url) {
echo "You do not have permission to use this script from another
URL.";
exit;
}

// The URLs matched so send the email
mail($your_email, $subject, $message, "From: $name <$email>");

// Display the Thank You message
//echo $thankyou_message; // Or you could redirect to another page etc...
header ('Location: http://www.abistech.com/ThankYou.htm');
exit();
}

?>

</body>

</html>
 
C

Chris Leeds, MVP-FrontPage

link bars, and other FrontPage components will fail on php pages.

If you want to have all the benefits of PHP and all the components in
FrontPage follow the instructions here:
http://contentseed.com/help/files/PHP_as_HTM-HTML.pdf

if you need specific help following the instructions let me know.

what you're actually doing is "tricking" FrontPage into thinking your php
pages are htm/html. It works really great, I've got lots of contentseed
users to prove it. ;-)

HTH

--
Chris Leeds,
Microsoft MVP-FrontPage

Make More Money with Less Work
Let Your Clients Control Their Content With Just A Browser!
http://contentseed.com/
--
pb said:
I have a PHP page in Frontpage. The link bar doesn't seem to be working in
the PHP page. DO navigational link bars work with in PHP Frontpage pages?
Here is the code for the page. It should work at the "NAVIGATION BAR" line
if you look below at the code, but it doesn't.

<?php

// '$empty_fields_message' and '$thankyou_message' can be changed if you wish.

// Change to your own email address
$your_email = "(e-mail address removed)";
//$your_email = "(e-mail address removed)";

// This is what is displayed in the email subject line
$subject = "Put your subject here";

// This is displayed if all the fields are not filled in
$empty_fields_message = "<p>Please go back and complete all the fields in
the form.</p>";

// This is displayed when the email has been sent
$thankyou_message = "<p>Thank you. Your message has been sent(How'd ya like
dem apples!!!)</p>";

// You do not need to edit below this line

// Assign form data to variable and strip any slashes
$name = stripslashes($_POST['txtName']);
$email = stripslashes($_POST['txtEmail']);
$message = stripslashes($_POST['txtMessage']);

// Has user entered their name - if not display the form
if (!isset($_POST['txtName'])) {

?>


<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>ABIS Inc. - Advanced Business Information Solutions - Contact
Us</title>
<link rel="stylesheet" type="text/css" href="images/include/style.css">


<style type="text/css">
a:link {text-decoration: none}
a:active {text-decoration: none}
a:visited {text-decoration: none}
a:hover {text-decoration: none}
</style>

<meta name="Microsoft Theme" content="ice152 011, default">
</head>

<body>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="100%" height="81">
<object classid="clsid:D27CDB6E-AE6D-11CF-96B8-444553540000"
id="ShockwaveFlash1" width="450" height="75"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.ca
b#version=5,0,0,0">
<param name="_cx" value="11906">
<param name="_cy" value="1984">
<param name="FlashVars" value>
<param name="Movie" value="flash/logoflash.swf">
<param name="Src" value="flash/logoflash.swf">
<param name="WMode" value="Window">
<param name="Play" value="-1">
<param name="Loop" value="-1">
<param name="Quality" value="High">
<param name="SAlign" value>
<param name="Menu" value="-1">
<param name="Base" value>
<param name="AllowScriptAccess" value="always">
<param name="Scale" value="ShowAll">
<param name="DeviceFont" value="0">
<param name="EmbedMovie" value="0">
<param name="BGColor" value>
<param name="SWRemote" value>
<param name="MovieData" value>
<param name="SeamlessTabbing" value="1">
<embed src="flash/logoflash.swf" quality="high"
bgcolor="#FFFFFF" WIDTH="450" HEIGHT="75"
TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_
Version=ShockwaveFlash"> said:
</td>
<td rowspan="2">
<table border="0" cellpadding="0" cellspacing="0" width="297"
height="103">
<tr>
<td width="100%" height="24" align="center"><a
href="products.htm"><font color="#003366">Buy Now</font></a><font
color="#336699"> </font> |
<a href="contact.htm"><font size="2" color="#003366">Contact
Us</font></a></td>
</tr>
<tr>
<td width="100%" background="images/tpbg.gif" height="78">
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.ca
b#version=5,0,0,0" WIDTH=297 HEIGHT=79>
<PARAM NAME=movie VALUE="flash/movie.swf">
<PARAM NAME=quality VALUE=high>
<PARAM NAME=bgcolor VALUE=#FFFFFF>
<EMBED src="flash/movie.swf" quality=high bgcolor=#FFFFFF WIDTH=297
HEIGHT=79 TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_
Version=ShockwaveFlash">
</EMBED></OBJECT>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="topline" height="22" bgcolor="#5C8CB8"> <i><font
color="#FFFFFF">Providing
Cost Effective Solutions For Small Businesses ...</font></i></td>
</tr>
</table>

<table border="0" cellpadding="0" cellspacing="0" width="100%"
bgcolor="#003366">
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="0" width="166"
height="25" background="images/corner1.gif">
<tr>
<td valign="bottom"><b><font color="#FFFFFF"> NAVIGATION
MENU</font></b></td>
</tr>
</table>
</td>
<td width="100%" align="right">
<p align="center">
<!--webbot bot="Navigation" S-Orientation="horizontal"
S-Rendering="graphics" S-Type="global" B-Include-Home="FALSE"
B-Include-Up="FALSE" U-Page S-Target --></p>
</td>
</tr>
</table>

<table border="0" cellpadding="0" cellspacing="0" width="100%" height="80%">
<tr>
<td bgcolor="#336699"> </td>
<td class="cellpadding" height="22" bgcolor="#5C8CB8">
<!--webbot bot="Navigation" S-Type="banner" S-Orientation="horizontal"
S-Rendering="graphics" B-Include-Home B-Include-Up U-Page
S-Target --> said:
<td><img border="0" src="images/corner2.gif" width="172"
height="22"> said:
</tr>
<tr>
<td width="166" valign="top" bgcolor="#336699">
<p align="center">
<!--webbot bot="Navigation" S-Orientation="vertical"
S-Rendering="graphics" S-Type="top" B-Include-Home="TRUE"
B-Include-Up="FALSE" U-Page S-Target --><p align="left">
<p align="left">
</td>
<td class="cellpadding" width="100%" valign="top" height="100%"><p>
<p><b><font size="2">ABIS
Contact Information</font></b></p>
<p><font size="1">If you have any questions regarding our products,
services or company, please contact us at:</font></p>
<p><b>Telephone:</b></p>
<p> 703-455-2009</p>
<p> </p>
<p><b>Fax:</b></p>
<p> 270-633-4227</p>
<p> </p>
<p><b>Hours</b></p>
<p><b> </b>M-F 8:00am - 4:30pm EST</p>
<p> </p>
<p><b>Postal Address:</b></p>
<p> <span lang="en-gb">To request postal
address, please fill out the form below.</span></p>
<p> </p>
<p><b>Product Sales: </b><a
href="mailto:sales@">[email protected] said:
<p><b>Consulting Services: </b><a
href="mailto:consulting@">[email protected]</a></p>
<p><b>General Information:</b> <a
href="mailto:info@">[email protected]</a></p>
<p> </p>
<hr>
<p> </p>
<p>Send Us a Message:</p>
<form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
<fieldset>
<legend>Please complete the form in FULL</legend>
<p><label for="txtName">Name:</label><br />
<input type="text" title="Enter your name" name="txtName"
value="<?php if (isset($_POST['txtName'])) echo $_POST['txtName']; ?>"
size="20" /></p>

<p><label for="txtEmail">Email Address:</label><br />
<input type="text" title="Enter your email address" name="txtEmail"
value="<?php if (isset($_POST['txtEmail'])) echo $_POST['txtEmail']; ?>"
size="20" /></p>

<p><label for="txtMessage">Enter your message:</label><br />
<textarea rows="3" cols="50" title="Enter your message" name="txtMessage"
value="<?php if (isset($_POST['txtMessage'])) echo $_POST['txtMessage'];
?>"></textarea></p>

<p><label title="Send your message">
<input type="submit" value="Send" /></label></p>
</fieldset>
</form>
</td>
<td class="newsbox" valign="top" bgcolor="#336699" width="172">
<table border="0" cellpadding="2" cellspacing="0" width="164">
<tr>
<td bgcolor="#F7BC5B">
<img border="0" src="images/pages.gif" align="middle"
width="11" height="13"> <b>News Box</b></td>
</tr>
<tr>
<td bgcolor="#FFFFFF"><font size="1"> Consumers primarily
abandon Web sites because they have customer service questions or pricing
issues. Post-visit communications offer an efficient means to personalize
online customer service without resorting to expensive and unproven site-side
personalization.
</font><i><font size="1">Jupiter Research.</font></i>
</td>
</tr>
</table>
<p> </p>
<table border="0" cellpadding="2" cellspacing="0" width="164">
<tr>
<td bgcolor="#F7BC5B"> <b>
<img border="0" src="images/pages.gif" align="middle"
width="11" height="13">
Question...</b></td>
</tr>
<tr>
<td bgcolor="#FFFFFF">What is your preferred method of obtaining
product information?<br>
<form method="POST" name="Information?"
action="--WEBBOT-SELF--"
onSubmit="location.href='_derived/nortbots.htm';return false;"
WEBBOT-onSubmit>
<!--webbot bot="SaveResults" s-email-format="TEXT/PRE"
s-email-address="(e-mail address removed)" b-email-label-fields="TRUE"
b-email-subject-from-field="TRUE" s-email-subject="Information Answer Form"
s-builtin-fields startspan --><strong>[FrontPage Save Results
Component]</strong><!--webbot bot="SaveResults" endspan i-checksum="6561" -->
<p><input type="radio" name="R1" value="Website"
checked>Website?</p>
<p><input type="radio" name="R1"
value="E-Mail">E-Mail? said:
<p><input type="radio" name="R1"
value="Phone">Phone? said:
<p><input type="radio" name="R1" value="Fax">Fax?</p>
<p> </p>
<p><input type="submit" value="Submit"
name="Submit"> said:
</form>
</td>
</tr>
</table>
<p> </p>
<p> </p>
</td>
</tr>
<tr>
<td bgcolor="#003366"><img border="0" src="images/space.gif"
width="166" height="1"></td>
<td bgcolor="#003366" height="24" align="center">
<!--webbot bot="Navigation" S-Orientation="horizontal"
S-Rendering="graphics" S-Type="arrows" B-Include-Home="TRUE"
B-Include-Up="TRUE" U-Page S-Target --></td>
<td bgcolor="#003366"><img border="0" src="images/space.gif"
width="170" height="1"></td>
</tr>
</table>

<p> </p>
<!--webbot bot="Include" U-Include="images/include/copyright.htm"
TAG="BODY" -->

<p> </p>
<?php

}

elseif (empty($name) || empty($email) || empty($message)) {

echo $empty_fields_message;

}

else {

// Stop the form being used from an external URL

//Get the referring URL
$referer = $_SERVER['HTTP_REFERER'];

// Get the URL of this page
$this_url = "http://".$_SERVER['HTTP_HOST'].$_SERVER["REQUEST_URI"];
// If the referring URL and the URL of this page don't match then
// display a message and don't send the email.
if ($referer != $this_url) {
echo "You do not have permission to use this script from another
URL.";
exit;
}

// The URLs matched so send the email
mail($your_email, $subject, $message, "From: $name <$email>");

// Display the Thank You message
//echo $thankyou_message; // Or you could redirect to another page etc...
header ('Location: http://www.abistech.com/ThankYou.htm');
exit();
}

?>

</body>

</html>
 

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