Jump to content

'Get' Results


adamdyer

Recommended Posts

Ok, so next part of my problem is such - I have to be able to retreive the data from my Database so that the customers are sorted into two seperate fields of £40 and £60.

 

PHP Coding

 

<html>
<head>
<title>View Customers by category</title>
</head>
<body>

<?php 

#get the Customer Price Category i.e. Acat variable
$Cat = $_GET['Acat'];

#--------------------------------------------------------

echo("<font face=Courier size=3>");
echo("<p>Customer Price Category Results for :$CAT <hr></P>");
$VariableName = $_GET['VariablePassed'];
#--------------------------------------------------------

# connect to MySQL
$conn = @mysql_connect("localhost","ajdref","ref2")
or die ("sorry - could not wont connect to MySQL"); 

# select the specified database
$rs = @mysql_select_db("ajdref", $conn)
or die ("sorry - could not connect to the ajdref");

#create the query - sets $sql to contain the required query
$sql = 'SELECT * FROM `Booking Database` ORDER BY `Booking Database` . `Price Cat` ASC LIMIT 0, 30 '; 

#execute the query - uses the mysql_query() function to issue the $sql query to the $conn connection
#$rs contains the result set in the form of an array
$rs = mysql_query($sql,$conn);

?>



</body>
</html> 

 

HTML Coding

<HTML>
<HEAD>
<TITLE> Search by category </TITLE>
</HEAD>
<BODY BGCOLOR=lemonchiffon >

<form NAME="GetCode" ACTION="customerpricecategory2.php" METHOD=get>

  <div align="center"><b><font size="4"> Search by Price Category</font></b></div>
      
  <p></p>
                    
  <div align="center">
    <p>Please choose price category from this list. 
      <select name="Acat">
          <option value="A" selected>A - £40 </option>
          <option value="B">B - £60 </option>
      </select>
    </p>  
  </div>
  
  <p></p>
                  
  <div align="center">Now click 'Send'. 
    <input type="submit" value="Send" name="SUBMIT" >
  </div>
</form>
</BODY>
</HTML>

Link to comment
https://forums.phpfreaks.com/topic/66224-get-results/
Share on other sites

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.