PDA

View Full Version : PHP - Jump to a record in a masterview ?


HeadAche
04-26-2006, 07:58 PM
I seek your help pleaseeeeee...

Problem guys (i got another one too but an saving it for later).

I have a classic set up on the go whereby there is a list view listing records & and then a Master view whereby you click on a record in the list view to be taken to the masterview of the item diplaying extented info for the clicked item. Nothing unusual there then.

I am trying to get a system on the go where you can jump directly to another item from within the masterview. At the moment I have just got a form with a textbox and a submit button.

I type a 'Lot Number' into the text box and press the submit button to jump to that lot number. The action on this form is set to the url for the masterview along with some url vars to further sort through the recordset on the masterview page.

The way I grab the the lot number from the textbox in the form at the mo is I have at the top of the masterview page code $nextLotNo = $_POST['lotNoTextBox'].

now this works but I have to press the submit button twice. Sort of guessing this is becasue the submit button has to be pressed once to set the value of $nextLotNo and then again to goto that record with the set Lot Number value.

Have pitty, for I am a PHP noob...

davidj
04-27-2006, 08:43 AM
Have pitty, for I am a PHP noob...

dont get pitty from me just respect for dipping your toe into the lake of PHP

the biggest mistake you will make however is to think that your learning PHP when really your learning how to press dreamweaver buttons that writes PHP code for you and is where you will struggle once you outgrow these toys

learn how to hand code and you will get xtra RESPECT from me

regarding your probs...

post your php

HeadAche
04-27-2006, 10:29 AM
dont get pitty from me just respect for dipping your toe into the lake of PHP

the biggest mistake you will make however is to think that your learning PHP when really your learning how to press dreamweaver buttons that writes PHP code for you and is where you will struggle once you outgrow these toys

learn how to hand code and you will get xtra RESPECT from me



You know how to shatter my illulstions mate, thanks... :wink: Would love to learn it proper though, just hope my designers mind can get around it.

Heres the code. I can PM you a link to a working online version aswell if you want?

Code on the mastview page is as follows.




<?php require_once('Connections/auction.php'); ?>
<?php $lotPageNo = $_POST['lotPageNo']; ?>
<?PHP $nextLotNo = $_GET['LotNo'] +1; ?>
<?PHP $totalRecsNo = $nextLotNo; ?>
<?PHP session_start();
//declare session display date
$_SESSION['MM_LastPrice'] = $SoldPrice;
$_SESSION['MM_LastCustomerId'] = $ClientID;
$_SESSION['MM_Quant'] = $_GET['available'];
?>

<?php
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;

switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "soldForm")) {
$updateSQL = sprintf("UPDATE stock SET SoldPrice=%s, AuctionDateSold=%s, Sold=%s, ClientID=%s WHERE Id=%s",
GetSQLValueString($_POST['SoldPrice'], "int"),
GetSQLValueString($_POST['AuctionDateSold'], "date"),
GetSQLValueString($_POST['Sold'], "text"),
GetSQLValueString($_POST['ClientID'], "text"),
GetSQLValueString($_POST['Id'], "int"));

mysql_select_db($database_auction, $auction);
$Result1 = mysql_query($updateSQL, $auction) or die(mysql_error());
}

if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "notsoldForm")) {
$updateSQL = sprintf("UPDATE stock SET SoldPrice=%s, AuctionDateSold=%s, Sold=%s, ClientID=%s WHERE Id=%s",
GetSQLValueString($_POST['SoldPrice'], "double"),
GetSQLValueString($_POST['AuctionDateSold'], "date"),
GetSQLValueString($_POST['Sold'], "text"),
GetSQLValueString($_POST['ClientID'], "int"),
GetSQLValueString($_POST['Id'], "int"));

mysql_select_db($database_auction, $auction);
$Result1 = mysql_query($updateSQL, $auction) or die(mysql_error());
}

$maxRows_rst_MasterView = 1;
$pageNum_rst_MasterView = 0;
if (isset($_GET['pageNum_rst_MasterView'])) {
$pageNum_rst_MasterView = $_GET['pageNum_rst_MasterView'];
}
$startRow_rst_MasterView = $pageNum_rst_MasterView * $maxRows_rst_MasterView;

$collot_rst_MasterView = "-1";
if (isset($_GET['LotNo'])) {
$collot_rst_MasterView = (get_magic_quotes_gpc()) ? $_GET['LotNo'] : addslashes($_GET['LotNo']);
}
$coldate_rst_MasterView = "-1";
if (isset($_GET['AuctionHeldIn'])) {
$coldate_rst_MasterView = (get_magic_quotes_gpc()) ? $_GET['AuctionHeldIn'] : addslashes($_GET['AuctionHeldIn']);
}
$colzone_rst_MasterView = "Auction 1";
if (isset($_GET['Zone'])) {
$colzone_rst_MasterView = (get_magic_quotes_gpc()) ? $_GET['Zone'] : addslashes($_GET['Zone']);
}
mysql_select_db($database_auction, $auction);
$query_rst_MasterView = sprintf("SELECT * FROM stock WHERE Zone = '%s' AND AuctionHeldIn = '%s' AND LotNo = '%s' AND Level='1' AND Arrived='1'", $colzone_rst_MasterView,$coldate_rst_MasterView,$c ollot_rst_MasterView);
$query_limit_rst_MasterView = sprintf("%s LIMIT %d, %d", $query_rst_MasterView, $startRow_rst_MasterView, $maxRows_rst_MasterView);
$rst_MasterView = mysql_query($query_limit_rst_MasterView, $auction) or die(mysql_error());
$row_rst_MasterView = mysql_fetch_assoc($rst_MasterView);

if (isset($_GET['totalRows_rst_MasterView'])) {
$totalRows_rst_MasterView = $_GET['totalRows_rst_MasterView'];
} else {
$all_rst_MasterView = mysql_query($query_rst_MasterView);
$totalRows_rst_MasterView = mysql_num_rows($all_rst_MasterView);
}
$totalPages_rst_MasterView = ceil($totalRows_rst_MasterView/$maxRows_rst_MasterView)-1;

$collotno_rst_totalItemIds = "-1";
if (isset($_GET['LotNo'])) {
$collotno_rst_totalItemIds = (get_magic_quotes_gpc()) ? $_GET['LotNo'] : addslashes($_GET['LotNo']);
}
$colzone_rst_totalItemIds = "-1";
if (isset($_SESSION['MM_AuctionZone'])) {
$colzone_rst_totalItemIds = (get_magic_quotes_gpc()) ? $_SESSION['MM_AuctionZone'] : addslashes($_SESSION['MM_AuctionZone']);
}
$coldate_rst_totalItemIds = "-1";
if (isset($_SESSION['MM_AuctionDate'])) {
$coldate_rst_totalItemIds = (get_magic_quotes_gpc()) ? $_SESSION['MM_AuctionDate'] : addslashes($_SESSION['MM_AuctionDate']);
}
$colname_rst_totalItemIds = "-1";
if (isset($row_rst_MasterView['ItemID'])) {
$colname_rst_totalItemIds = (get_magic_quotes_gpc()) ? $row_rst_MasterView['ItemID'] : addslashes($row_rst_MasterView['ItemID']);
}
mysql_select_db($database_auction, $auction);
$query_rst_totalItemIds = sprintf("SELECT * FROM stock WHERE ItemID = '%s' AND AuctionHeldIn = '%s' AND Zone = '%s' and lotno > '%s' and sold = 'NotSold' AND Arrived = '1' AND Level = '1' ", $colname_rst_totalItemIds,$coldate_rst_totalItemId s,$colzone_rst_totalItemIds,$collotno_rst_totalIte mIds);
$rst_totalItemIds = mysql_query($query_rst_totalItemIds, $auction) or die(mysql_error());
$row_rst_totalItemIds = mysql_fetch_assoc($rst_totalItemIds);
$totalRows_rst_totalItemIds = mysql_num_rows($rst_totalItemIds);

$colzone_rst_nextItem = "-1";
if (isset($_GET['Zone'])) {
$colzone_rst_nextItem = (get_magic_quotes_gpc()) ? $_GET['Zone'] : addslashes($_GET['Zone']);
}
$coldate_rst_nextItem = "-1";
if (isset($_GET['AuctionHeldIn'])) {
$coldate_rst_nextItem = (get_magic_quotes_gpc()) ? $_GET['AuctionHeldIn'] : addslashes($_GET['AuctionHeldIn']);
}
$colname_rst_nextItem = "-1";
if (isset($nextLotNo)) {
$colname_rst_nextItem = (get_magic_quotes_gpc()) ? $nextLotNo : addslashes($nextLotNo);
}
mysql_select_db($database_auction, $auction);
$query_rst_nextItem = sprintf("SELECT * FROM stock WHERE LotNo = '%s' AND Zone = '%s' AND AuctionHeldIn = '%s' AND Level='1' AND Arrived='1'", $colname_rst_nextItem,$colzone_rst_nextItem,$colda te_rst_nextItem);
$rst_nextItem = mysql_query($query_rst_nextItem, $auction) or die(mysql_error());
$row_rst_nextItem = mysql_fetch_assoc($rst_nextItem);
$totalRows_rst_nextItem = mysql_num_rows($rst_nextItem);

$colname_rst_LinkedToStock = "-1";
if (isset($row_rst_MasterView['Id'])) {
$colname_rst_LinkedToStock = (get_magic_quotes_gpc()) ? $row_rst_MasterView['Id'] : addslashes($row_rst_MasterView['Id']);
}
mysql_select_db($database_auction, $auction);
$query_rst_LinkedToStock = sprintf("SELECT * FROM stock WHERE LinkedToStockID = '%s' AND Level='2' ORDER BY LinkedToStockID ASC", $colname_rst_LinkedToStock);
$rst_LinkedToStock = mysql_query($query_rst_LinkedToStock, $auction) or die(mysql_error());
$row_rst_LinkedToStock = mysql_fetch_assoc($rst_LinkedToStock);
$totalRows_rst_LinkedToStock = mysql_num_rows($rst_LinkedToStock);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>CSM Plus Ltd - Auction System</title>
<link href="/CSS/main.css" rel="stylesheet" type="text/css" />
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>

<body onload="MM_preloadImages('/images/back_on.gif','/images/next_on.gif')">
<?php if ($totalRows_rst_MasterView > 0) { // Show if recordset not empty ?>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<th scope="col">
</th>
</tr>
<tr>
<th scope="col"><marquee>
<span class="style9">Next Item &gt;&gt; Lot:</span> <span class="style6"><?php echo $row_rst_nextItem['LotNo']; ?></span> <span class="style9">Product Code:</span> <span class="style6"><?php echo $row_rst_nextItem['ProductCode']; ?></span> <span class="style9">Description: </span><span class="style6"><?php echo $row_rst_nextItem['Description']; ?></span></marquee> </th>
</tr>
</table>


<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th scope="col"><table width="95%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th height="99" scope="col"><table width="121" border="0" cellspacing="0" cellpadding="0">
<tr>
<th scope="col">/images/tabs/lotno_top.gif</th>
</tr>
<tr>
<td height="67" align="center" class="tabbg"><?php echo $row_rst_MasterView['LotNo']; ?></td>
</tr>
</table></th>
<th scope="col"><table width="121" border="0" cellspacing="0" cellpadding="0">
<tr>
<th scope="col">/images/tabs/reserve_top.gif</th>
</tr>
<tr>
<td height="67" align="center" class="tabbg">&pound;<?php echo $row_rst_MasterView['ReservePrice']; ?></td>
</tr>
</table></th>
<th scope="col"><table width="121" border="0" cellspacing="0" cellpadding="0">
<tr>
<th scope="col">/images/tabs/incomplot_top.gif</th>
</tr>
<tr>
<td>/images/tabs/<?php echo $row_rst_MasterView['CompleteLot']; ?>incomplot_bottom.gif</td>
</tr>
</table></th>
<th scope="col"><table width="121" border="0" cellspacing="0" cellpadding="0">
<tr>
<th scope="col">/images/tabs/sold_top.gif</th>
</tr>
<tr>
<td>/images/tabs/<?php echo $row_rst_MasterView['Sold']; ?>_bottom.gif</td>
</tr>
</table></th>
</tr>
</table></th>
</tr>
</table>


<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th colspan="2" scope="col"><table width="98%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th align="left" scope="col"><?php echo $_SESSION['MM_AuctionDate']; ?><?php echo $_SESSION['MM_AuctionZone']; ?></th>
</tr>
</table></th>
</tr>
<tr>
<th width="50%" valign="top" scope="col">
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<th align="left" bgcolor="#999999" class="style5 style7" scope="col">Product Code</th>
</tr>
<tr>
<th align="left" scope="col"><span class="style3"><?php echo $row_rst_MasterView['ProductCode']; ?></span></th>
</tr>
<tr>
<th align="left" bgcolor="#999999" scope="col"><span class="style5 style7">Description</span></th>
</tr>
<tr>
<th align="left" scope="col"><span class="style3"><?php echo $row_rst_MasterView['Description']; ?></span></th>
</tr>
<tr>
<th align="left" bgcolor="#999999" scope="col"><span class="style5 style7">Incomplete Reason </span></th>
</tr>
<tr>
<th align="left" scope="col"><span class="style3"><?php echo $row_rst_MasterView['IncompleteReason']; ?></span></th>
</tr>
<tr>
<th align="left" bgcolor="#999999" scope="col"><span class="style5 style7">VAT Flag </span></th>
</tr>
<tr>
<th align="left" scope="col">
/images/<?php echo $row_rst_MasterView['VATProductFlag']; ?>VAT.gif</th>
</tr>
<tr>
<th align="left" bgcolor="#999999" scope="col"><span class="style5 style7">How many more available...</span></th>
</tr>
<tr>
<th align="left" scope="col">
<?php if ($totalRows_rst_totalItemIds > 0) { // Show if recordset not empty ?>
<?php echo $totalRows_rst_totalItemIds ?>
<?php } // Show if recordset not empty ?> </th>
<?PHP session_start();
$_SESSION['MM_Quant'] = $totalRows_rst_totalItemIds;
?>
</tr>
<tr>
<th align="left" bgcolor="#999999" scope="col"><span class="style5 style7">Also includes <?php echo $totalRows_rst_LinkedToStock ?> more items </span></th>
</tr>
<tr>
<th align="left" scope="col"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<?php do { ?>
<tr>
<td class="style3"><?php echo $row_rst_LinkedToStock['Description']; ?></td>
</tr>
<?php } while ($row_rst_LinkedToStock = mysql_fetch_assoc($rst_LinkedToStock)); ?>
</table></th>
</tr>
<tr>
<th align="left" scope="col"></th>
</tr>
<tr>
<th align="left" scope="col"></th>
</tr>
<tr>
<th align="left" scope="col"></th>
</tr>
</table></th>
<th width="50%" valign="top" scope="col"><table width="90%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th scope="col">

</p>


/images/products/<?php echo $row_rst_MasterView['Id']; ?>.jpg</p></th>
</tr>
</table> </th>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th height="236" valign="top" scope="col"><table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>
<th height="124" colspan="2" align="center" valign="top" scope="col"><table width="98%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th width="300" align="left" valign="top" scope="col"><table width="250" border="0" cellspacing="0">

<tr>
<th colspan="2" align="center" valign="bottom" scope="col"> <fieldset>
<legend class="style9">Sell Price & Customer ID</legend>
<form action="<?php echo $editFormAction; ?>" name="soldForm" id="soldForm" method="post">
<table width="100%" border="0" cellspacing="0">
<tr>
<th width="50%" align="left" scope="col">Sold Price </th>
<th width="50%" align="left" scope="col">Customer ID </th>
</tr>
<tr>
<td width="50%" align="left">&pound;
<input name="SoldPrice" type="text" id="SoldPrice" onfocus="if(this.value=='')this.value='';" value="" size="5" maxlength="5" /></td>
<td width="50%" align="left"><input name="ClientID" type="text" id="ClientID" onfocus="if(this.value=='')this.value='';" size="5" maxlength="5" />
<input name="Id" type="hidden" id="Id" value="<?php echo $row_rst_MasterView['Id']; ?>" />
<input name="Sold" type="hidden" id="Sold" value="Sold" />
<input name="AuctionDateSold" type="hidden" id="AuctionDateSold" value="<?php echo date("Y-m-d"); ?>" /> </td>

</tr>
</table>

<input type="submit" name="Submit" value="SELL to customer" />
<input type="hidden" name="MM_update" value="soldForm" />
<input type="hidden" name="MM_update" value="soldForm">
</form>
</fieldset></th>
</tr>
</table></th>
<th width="300" align="left" valign="top" scope="col"><table width="250" border="0" cellspacing="0" cellpadding="0">
<tr>
<th scope="col"><table width="250" border="0" cellspacing="0" cellpadding="0">
<tr>
<th scope="col"><fieldset>
<legend class="style9">Change to Not Sold</legend>
<form name="notsoldForm" id="notsoldForm" method="POST" action="<?php echo $editFormAction; ?>">
<table width="250" border="0" cellspacing="0">
<tr>
<th width="54%" align="center" scope="col"><span class="style5">Sold / Not Sold</span></th>
<th width="46%" align="center" scope="col">/images/<?php echo $row_rst_MasterView['Sold']; ?>.gif</th>
</tr>
<tr align="center">
<td colspan="2">



<input type="submit" name="Submit" value="Change to NOT SOLD" />
<input name="Id" type="hidden" id="Id" value="<?php echo $row_rst_MasterView['Id']; ?>" />
<input name="Sold" type="hidden" id="Sold" value="NotSold" />
<input name="AuctionDateSold" type="hidden" id="AuctionDateSold" />
<input name="ClientID" type="hidden" id="ClientID" />
<input name="SoldPrice" type="hidden" id="SoldPrice" />
</td>
</tr>
</table>
<input type="hidden" name="MM_update" value="notsoldForm" />
</form>
</fieldset></th>
</tr>
</table></th>
</tr>
</table></th>
<th align="center" valign="bottom" scope="col"><table width="350" border="0" cellspacing="0" cellpadding="0">
<tr>
<th width="20%" scope="col"><span class="style5">/images/back_off.gif (/item_masterview.php?LotNo=<?php echo $row_rst_MasterView['LotNo'] -1; ?>&amp;Zone=<?php echo $_SESSION['MM_AuctionZone']; ?>&amp;AuctionHeldIn=<?php echo $_SESSION['MM_AuctionDate']; ?>&amp;Level=1&amp;Arrived=1&amp;Arrived=1&amp;ItemID=<?php echo $row_rst_MasterView['ItemID']; ?>)</span></th>
<th width="60%" scope="col"><form name="lotnumberjump" id="lotnumberjump" method="post" action="/item_masterview.php?LotNo=<?php echo $lotPageNo ; ?>&Zone=<?php echo $_SESSION['MM_AuctionZone']; ?>&AuctionHeldIn=<?php echo $_SESSION['MM_AuctionDate']; ?>&Level=1&Arrived=1">
<span class="style9">GOTO</span>
<input name="lotPageNo" type="text" id="lotPageNo" size="4" />

<input name="GO" type="submit" id="GO" value="GO" />
</form></th>
<th width="20%" scope="col"><span class="style5">/images/next_off.gif (/item_masterview.php?LotNo=<?php echo $row_rst_MasterView['LotNo'] +1; ?>&amp;Zone=<?php echo $_SESSION['MM_AuctionZone']; ?>&amp;AuctionHeldIn=<?php echo $_SESSION['MM_AuctionDate']; ?>&amp;Level=1&amp;Arrived=1&amp;ItemID=<?php echo $row_rst_MasterView['ItemID']; ?>)</span></th>
</tr>
<tr align="center">
<th colspan="3" scope="col"><form name="form1" id="form1" method="post" action="/sell_more.php?Zone=<?php echo $_SESSION['MM_AuctionZone']; ?>&AuctionHeldIn=<?php echo $_SESSION['MM_AuctionDate']; ?>&LotNo=<?php echo $row_rst_MasterView['LotNo']; ?>&ItemID=<?php echo $row_rst_MasterView['ItemID']; ?>" target="_blank">
Sell

<input name="available" type="text" id="available" value="<?php echo $totalRows_rst_totalItemIds ?>" size="3" />

<input name="submit" type="submit" id="submit" value="more to client" />
</form>
<?php echo $_SESSION['MM_LastPrice']; ?>*<?php echo $_SESSION['MM_LastCustomerId']; ?>

<?php echo $_SESSION['MM_Quant']; ?></th>

</tr>
</table></th>
</tr>
</table></th>
</tr>
<tr>
<th width="50%" height="19" align="center" valign="top" scope="col"> </th>
<th width="442" height="19" colspan="-1" align="center" valign="top" scope="col"></th>
</tr>
<tr>
<th height="19" colspan="2" align="center" valign="top" scope="col">current item id <span class="style6"><?php echo $row_rst_MasterView['ItemID']; ?></span> is next lot Item Id is <?php echo $row_rst_nextItem['ItemID']; ?> </th>
</tr>
<tr>
<th height="19" colspan="2" scope="col">

<input type="button" value="Close Window" onclick="javascript:self.close();" />
</p>
</th>
</tr>
</table></th>
</tr>
</table>
<?php } // Show if recordset not empty ?>




<?php if ($totalRows_rst_MasterView == 0) { // Show if recordset empty ?>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center">

</p>


</p>


There is no lot number following on from the last one. Please close this window and select the next lot from the list view.

</p>




<input type="button" value="Close Window" onclick="javascript:self.close();" />
</p></td>
</tr>
</table>
<?php } // Show if recordset empty ?>
<!--
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th scope="col"><span class="style6">!</span> There are no more items in this lot



Options

<span class="style5">Go back to last lot item (javascript:history.go(-1);)

Close this window and goto list view (javascript:window.close();)

Go to date select page and select new auction date / zone. </span></th>
</tr>
</table>
-->
</p>
</body>
</html>
<?php
mysql_free_result($rst_MasterView);

mysql_free_result($rst_totalItemIds);

mysql_free_result($rst_nextItem);

mysql_free_result($rst_LinkedToStock);
?>

Have higlighted the relevant in Bold...

davidj
04-27-2006, 01:18 PM
The action on this form is set to the url for the masterview along with some url vars to further sort through the recordset on the masterview page.

if you are passing vars through a URL then you have to use GET method to catch them

HeadAche
04-27-2006, 01:55 PM
OK, have done that and it still doesnt seem to be passing the var through to the link. I have since inserted a show / hide if record set is empty and because the LotNo=(nothing) I and getting my show if rec-set is empty text so I dont even get to press the button twice anymore...

!?!?!?!

davidj
04-27-2006, 02:01 PM
i am still not entirly sure what you are trying to do

yo need to post a url for me to see this working

HeadAche
04-27-2006, 02:22 PM
Check ya PM's man...

davidj
04-27-2006, 02:29 PM
check your messenger

HeadAche
04-27-2006, 03:54 PM
Thanks dj,

Have just looked it over and think I understand what is going on now. I learn best through practise so I am going to try and adopt this method to something else in the project to reinforce my understanding...