More information on what I'm trying to do:
HTML code which is an include file to a .SHTML file.
Code:
<?php
include("dd-process.php");
?>
<html>
<head>
</head>
<body bgcolor=white lang=EN-US link=black vlink=black>
<table border=0 width=500 cellspacing=0 cellpadding=0 align=center height=400 width=800>
<form method=post action="dd-process.php" name=parts>
<tr height=20>
<td valign=top bgcolor="#ffffff">
<center>
<font face="Verdana" size="4"><b>My Title</b></font>
<br>
<font face="Verdana" size="3">Parts Catalog</font>
<br>
<font face="Verdana" size="3"><b>Category:</b></font>
</td>
</tr>
<tr height=5>
<td height=5></td>
</tr>
<tr height=30>
<td align=center valign=top>
<SELECT NAME="Type">
<OPTION SELECTED>
<OPTION value="Bkt">Buckets
<OPTION value="Fan">Fans - Cooling
<OPTION value="Air">Filters - Air, Lube, Industrial
<OPTION value="Fld">Fluids
<OPTION value="Hrd">Hardware
<OPTION value="Int">Intake/Exhaust Systems
<OPTION value="Pre">Pre-Cleaning - Air
<OPTION value="Scr">Scrapers
<OPTION value="Tee">Teeth
<OPTION value="Tir">Tires
<OPTION value="Tol">Tools - Ground Engaging
<OPTION value="Use">Used Parts
</SELECT>
<br><br>
<input type=submit name=Prc value=Get>
</td>
</tr>
<tr height=5>
<td height=5></td>
</tr>
<tr>
<td>
<table border=5 height=300>
<! Write the table elements from the PHP script! >
<?php
echo "Found Table!";
echo $mid_block;
?>
</table>
</td>
</tr>
</form>
</table>
</body>
</html>
PHP script code
Code:
<?php
$mid_block = "<tr><td></td></tr>";
if ($_POST["Type"] == 'Fan') {
echo "Found Fan!";
$mid_block = "
<tr>
<td rowspan=3 width=25%>
<img src='./Images/flexxairefan.gif'>
</td>
<td colspan=2 width=75%>
<font face=Verdana size=3>
<b>Cooling Fans by&col;
</td>
</tr>
<tr>
<td>
<font face=Verdana size=3><ul>FlexxAire</ul>
</td>
</tr>
<tr>
<td>
<font face=Verdana size=3><ul>SandVik</ul>
</td>
</tr>
";
} elseif ($_POST["Type"] == 'Air') {
echo "Found Air!";
$mid_block = "
<tr>
<td rowspan=3 width=25%>
<img src='./Images/luberfiner.jpg'>
</td>
<td colspan=2 width=75%>
<font face=Verdana size=3>
<b>Cooling Fans by&col;
</td>
</tr>
<tr>
<td>
<font face=Verdana size=3><ul>FlexxAire</ul>
</td>
</tr>
<tr>
<td>
<font face=Verdana size=3><ul>SandVik</ul>
</td>
</tr>
";
}
?>
This process OK as I see the "Found <value>" statement, but in a new session, which blanks the original browser session and writes just the echo value.
Need this to write In place when the button is clicked/activated. Since this is part of an included file the orginal must stay in place.
Tried leaving out the echo(s) but saw no processing, included to check processing. I also look through the online PHP help to see if there was a refresh command so my inline echo would refresh it's value, but could not find anything on refresh.
If you need I can include a generic stripped version of the .SHTML file as well, which is the template file. This whole thing writes into a non-frame text area on the page.
Wanted to do buttonless but settled on the button as I could not find anything to support other activities unless I added a Java Script.
OMR