EisFuX: Variablen

Beitrag lesen

Hallo blubber,

  
<?php  
include_once('inc/include_all.php');  
include("dumpr.php");  
$user = 1;  
$abfrage="SELECT * FROM t_tequipment";  
$equipment =$db->GetAll($abfrage);  
  
ob_start();  
<<<ENDE  
  
<form name="liste">  
<select name='werte' onChange='errechnekosten()'>  
<option>1</option>  
<option>2</option>  
<option>3</option>  
<option>4</option>  
<option>5</option>  
<option>6</option>  
<option>7</option>  
<option>8</option>  
<option>9</option>  
<option>10</option>  
</select></form>  
  
$liste .="<tr><th>Equipment</th><th>Für Wievie Einheiten mieten?</th><th>Kosten/Einheit</th></tr>";  
  
for ($i=0;$i<COUNT($equipment);$i++){  
 $liste .="<tr><td>{$equipment[$i][Equipment]}</td><td>$out</td><td>{$equipment[$i][Kosten_Einheit]}</td></tr>";  
  
}  
?>  
  
<form name="myform">  
<input type="text" name="feld">  
</form>  
<script language="JavaScript">  
function errechnekosten(myform){  
 document.myform.feld.value=2;  
}  
</script>  
<table border=1>  
<?  
echo '$liste';  
?>  
</table>  
ENDE;  
  
  
$out = ob_get_flush();  
  
  
dumpr ($out);  
?>  

ob_start()
ob_get_flush()

Was auch immer du damit erreichen willst ...

MffG
EisFuX

--
Erinnert mich ein Bisschen an die if-then-Schleifen von Java.
(Alexandra Freund, IT-Compactkurs)