es ist mir ja schon ein wenig peinlich...
ich zeige hier termine an zum tagesdatum.
mit den beiden submit buttons soll die selbe seite nochmal ausgegeben werden jedoch mit nem tag davor oder danach, je nach button. wie geb ich in dem fall die variablen weiter. die inhalte bein post sind weg so dass dann +1 oder -1 drin steht
PHP-Code:
<?php
<?
include("lang/de.php");
include('include/dataconfig.php');
include('include/dataconnection.php');
include('include/dataselectdb.php');
include('include/sessionvar.php');
?>
<html>
<head>
<link href="silencia.css" rel="stylesheet" type="text/css">
</head>
<body>
<h1><?=$TEXT['start-head']?></h1>
[b]<?=$TEXT['start-subhead']?>[/b]
<body>
<table border=0 cellpadding=0 cellspacing=0>
<tr bgcolor=#228B22>
<td><img src=images/blank.gif width=10 height=25></td>
<td class=tabhead><img src=images/blank.gif width=30 height=6>
[b]<?=$TEXT['']?>[/b]</td>
<td class=tabhead><img src=images/blank.gif width=30 height=6>
[b]<?=$TEXT['']?>[/b]</td>
<td class=tabhead><img src=images/blank.gif width=80 height=6>
[b]<?=$TEXT['termine-attrib01']?>[/b]</td>
<td class=tabhead><img src=images/blank.gif width=100 height=6>
[b]<?=$TEXT['termine-attrib02']?>[/b]</td>
<td class=tabhead><img src=images/blank.gif width=100 height=6>
[b]<?=$TEXT['termine-attrib03']?>[/b]</td>
<td class=tabhead><img src=images/blank.gif width=120 height=6>
[b]<?=$TEXT['termine-attrib04']?>[/b]</td>
<td class=tabhead><img src=images/blank.gif width=80 height=6>
[b]<?=$TEXT['termine-attrib05']?>[/b]</td>
<td class=tabhead><img src=images/blank.gif width=80 height=6>
[b]<?=$TEXT['termine-attrib06']?>[/b]</td>
<td class=tabhead><img src=images/blank.gif width=150 height=6>
[b]<?=$TEXT['termine-attrib07']?>[/b]</td>
<td class=tabhead><img src=images/blank.gif width=80 height=6>
[b]<?=$TEXT['termine-attrib08']?>[/b]</td>
<td class=tabhead><img src=images/blank.gif width=80 height=6>
[b]<?=$TEXT['termine-attrib09']?>[/b]</td>
<td class=tabhead><img src=images/blank.gif width=150 height=6>
[b]<?=$TEXT['termine-attrib10']?>[/b]</td>
<td><img src=images/blank.gif width=10 height=25></td>
</tr>
<?
if($gestern) // abbrechen wurde gedrückt
{
$tag=$tag-1;
}
else
{
if($morgen)
{
$tag=$tag+1;
}
else // heute
{
$tag=strftime("%Y"."%m"."%d");
}
}
echo "<form action=start.php?".$tag." method=post>";
$result=mysql_query("SELECT te_firma,te_id,te_datan,te_daten,te_user,te_von,te_bis,te_art,te_objnr,te_objj,te_ort FROM termine WHERE te_firma=$s_firma and te_datan=$tag ORDER BY te_firma,te_datan,te_von;");
$i=0;
while( $row=mysql_fetch_array($result) )
{
if($i>0)
{
//trennstrich zwischen ds
echo "<tr valign=bottom>";
echo "</tr>";
}
echo "<tr valign=center>";
echo "<td class=tabval><img src=images/blank.gif width=10 height=20></td>";
echo "<td class=tabval><img src=images/blank.gif width=10 height=20></td>";
echo "<td class=tabval><a onclick=\"return confirm('".$TEXT['termine-sure2']."');\" href=termine_upd.php?action=upd&te_firma=".$row['te_firma']."&te_id=".$row['te_id']."><span class=red>[".$TEXT['termine-button3']."]</span></a></td>";
echo "<td class=tabval>[b]".$row['te_firma']."[/b]</td>";
echo "<td class=tabval>".$row['te_datan']." </td>";
echo "<td class=tabval>".$row['te_daten']." </td>";
echo "<td class=tabval>".$row['te_user']." </td>";
echo "<td class=tabval>".$row['te_von']." </td>";
echo "<td class=tabval>".$row['te_bis']." </td>";
echo "<td class=tabval>".$row['te_art']." </td>";
echo "<td class=tabval>".$row['te_objnr']." </td>";
echo "<td class=tabval>".$row['te_objj']." </td>";
echo "<td class=tabval>".$row['te_ort']." </td>";
echo "<td class=tabval></td>";
echo "</tr>";
$i++;
}
echo "</TABLE>";
echo "</body>";
echo "
$tag</p>";
echo "<input type=submit name=gestern value='Tag davor'>";
echo "<input type=submit name=morgen value='Tag danach'>";
echo "</FORM>";
echo "</html>";
?>
?>
mein problem ist wie muss ich die variable in der input/submit bzw in der form action definieren. die $tag kennt der nicht wenn error reporting an ist