Forum Moderators: coopster
I need to have the numbers returned as links which can be clicked on to return the same report for that number. For example, I enter store 1000 and get a list of equipment currently at that store. Each serial number in that list is a link, and I want to be able to click on a serial number and get the report back that lists where it's been - and vice versa. I'm not sure how to send back the number that is clicked as a variable to that same script - I'm assuming it would use GET in someway, but I'm not sure how.
Any help?
lets say you have these links. one for the store number and the second for the serial number.
<!-- store link -->
<a href="myPage.php?storeNumber=1000">Store 1000</a> <!-- serial link -->
<a href="myPage.php?serialNumber=9999">Serial 9999</a>
now on your script, you'd have to retrieve those values that were passed. you need to process for both because you never know if you're going to get the serial number or the store number. so, you have to check for both variables.
<?
//if store number is set
if(isset($_GET['storeNumber'])){
//retrieve store number and query accordingly
}//if serial number was set
elseif(isset($_GET['serialNumber'])){
//retrieve serial number and process accordingly.
}
//none was set, default
else{
}
?>