Top
Home


<?php
  $dbhost = 'localhost';
  $dbuser = 'USER';
  $dbpass = 'PASSWORD';
  $db = 'DATABASE';
  $conn = mysql_connect($dbhost, $dbuser, $dbpass,$db);
  if(! $conn )
  {
     die("Could not connect: " . mysql_error());
  }
  $sql = "SELECT * FROM TABLE where FIELD like '$Event'";
  mysql_select_db($db);
  $retval = mysql_query( $sql, $conn );
     if(! $retval )
  {
     die('Could not get data: ' . mysql_error());
  }
     while($row = mysql_fetch_array($retval, MYSQL_NUM))
  {
$Cost= $row[2];
  }
mysql_free_result($retval);
mysql_close($conn);
?>