Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(($_GET['priceRange'] != Greater && $_GET['priceRange'] != Less) || $_GET['specifiedprice'] == null){
- echo "Please go back and fill in all of the form fields.";
- }else{
- $conn = pg_connect("host=database.dcs.aber.ac.uk port=5432 dbname=teaching user=csguest password=rohishe");
- $res = pg_query ($conn, "select title, price from CSGames");
- $refQuery = pg_query ($conn, "select refnumber from CSGames");
- echo "";
- while ($a = pg_fetch_array($res)){
- $refNum = pg_fetch_array($refQuery);
- if($_GET['priceRange'] == Greater){
- if($a[1] > $_GET['specifiedprice']){
- echo "";
- echo "";
- for ($j = 0; $j < pg_num_fields($res); $j++){
- echo "";
- }
- echo "";
- }
- }elseif($_GET['priceRange'] == Less){
- if($a[1] < $_GET['specifiedprice']){
- echo "";
- echo "";
- for ($j = 0; $j < pg_num_fields($res); $j++){
- echo "";
- }
- echo "";
- }
- }
- }
- echo "<table border="1"><tbody><tr><td>" . "<input name="selectedGame[]" value="$refNum[0]" type="checkbox">" . "</td><td>" . $a[$j] . "</td></tr><tr><td>" . "<input name="selectedGame[]" value="$refNum[0]" type="checkbox">" . "</td><td>" . $a[$j] . "</td></tr></tbody></table>";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement