Forum Moderators: coopster
Here are the contents:
<div>{triplogreport}</div>
Here is the tag I am trying to use:
$host = "localhost";
$user = "username";
$pass = "password";
$dbname = "dbname";
$connection = mysql_connect($host,$user,$pass) or die (mysql_errno().": ".mysql_error()."<BR>");
mysql_select_db($dbname);
if (is_numeric($_GET['trip'])) {
$tripdetail = $_GET['trip'];
} else {
echo 'that is not a number';
die;
}
$sql = 'SELECT * FROM trip_log WHERE trip_id=' . $tripdetail;
$result = mysql_query($sql) or die ('<p>select died: ' . mysql_error());
while ($row = mysql_fetch_array($result)) {
$startdate = date("F d, Y",$row['startdate']);
$enddate = date("F d, Y",$row['enddate']);
echo '<strong>',$row['triplocation'],', ',$row['state'],'</strong>';
echo '<br>';
echo $startdate;
if ($enddate!= $startdate) echo ' to ',$enddate;
echo '<br>';
if (!empty($row['riverclass'])) echo '<strong>River Class: </strong>',$row['riverclass'],'<br>';
if (!empty($row['rivercondition'])) echo '<strong>Water Level: </strong>',$row['rivercondition'],'<br>';
if (!empty($row['GaugeID'])) echo '<strong>USGS Gauge Info: </strong>',$row['GaugeID'],'<br>';
if (!empty($row['GaugeFT'])) echo '<strong>USGS Gauge Height: </strong>',$row['GaugeFT'],'<br>';
if (!empty($row['GaugeCFS'])) echo '<strong>USGS Flow: </strong>',$row['GaugeCFS'],'<br>';
if (!empty($row['triporganizer'])) echo '<br>';
if (!empty($row['triporganizer'])) echo '<strong>Trip Organizer: </strong>',$row['triporganizer'],'<br>';
if (!empty($row['p1'])) echo '<br>';
if (!empty($row['p1'])) echo '<strong>Participant Names:</strong><br>';
if (!empty($row['p1'])) echo ,$row['p1'],'<br>';
if (!empty($row['p2'])) echo ,$row['p2'],'<br>';
if (!empty($row['p3'])) echo ,$row['p3'],'<br>';
if (!empty($row['p4'])) echo ,$row['p4'],'<br>';
if (!empty($row['p5'])) echo ,$row['p5'],'<br>';
if (!empty($row['p6'])) echo ,$row['p6'],'<br>';
if (!empty($row['p7'])) echo ,$row['p7'],'<br>';
if (!empty($row['p8'])) echo ,$row['p8'],'<br>';
echo '<br>';
echo '<strong>Trip Report:</strong><br>';
echo '',$row['report'],'<br>';
echo '<br>';
echo '<strong>Trip Report Author: </strong><a href="mailto:',$row['email'],'">',$row['author'],'</a><br>';
echo '<br>';
echo '<br>';
echo '<a href="javascript:history.back(1)">
Back</a>';
}