Jump to content

[SOLVED] frameset and target generate error,


alin19

Recommended Posts

i have a page and that page is divdided in 2 frameset; when the page is first loaded, it works fine, but when i press load i get the message that invalid arguments syply foreach

 

this is a part of the script that is loaded in the left side:

<td><a href='tranzactii.php?contract=DERRC&scadenta=IUN08' target='tranzactii'>Load</a></td>

 

and i have this script: that is loaded in the right side

<?php

include('db.php');

$pagina = array();

$conn = new db();
$conn->open();
if ((isset($_GET['contract']))&&(isset($_GET['scadenta'])))
{
$contract=$_GET['contract'];
$scadenta=$_GET['scadenta'];
}
else 
{
$contract='DESIF2';
$scadenta='IUN08';
}

$select=$conn->select("select * from tranzactii where `contract`='$contract' and `scadenta`='$scadenta' order by ora desc");
echo $select[0]['cantitate'];
echo "<table border=1>";
echo "<tr><td>Contracte</td><td>Pret</td><td>Cumparator</td><td>Vanzator</td><td>Tip</td><td>Ora</td></tr>";
  foreach ($select as $info)
  {
  echo "<tr>";
  echo "<td>".$info['cantitate']."</td>";
  echo "<td>".$info['pret']."</td>";
  echo "<td>".$info['cod_clB']."</td>";
  echo "<td>".$info['cod_clV']."</td>";
  echo "<td>".$info['tip_tran']."</td>";
  echo "<td>".$info['ora']."</td>";
  echo "</tr>";
  }
echo "</table>";

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.