<?
// This is how you get all variables from he url
// This is why descriptive names are important, as this takes all the names and assigns the values to the names
foreach ($_GET as $name => $value){
$name = $value;
}
// MYSQL database connections
$connection = mysql_connect("server", "username", "password");
// select database
mysql_select_db("db_name", $connection);
// Create query
$query = "SELECT * from TABLENAME_HERE"
// Exectute query
$result = mysql_query($query);
// While there is data to be taken...
while ($row = mysql_fetch_array($result)){
// If a certian variable from the get (url variable) is set, include a peice of mysql data
if (isset($GET_VAR_NAME)){
echo $row["MYSQL_DATA_ROW_NAME"];
}
}
// add more isset() to add more possibilities
mysql_close($connection);
?>