<?php

include("../include/session.php");
if(!$session->logged_in){
	header("Location: ../main.php");
}else{
include("../productionHeader.php");
	$q = "SELECT recipieId, recipieName FROM recipie";
	$r = execsql($q);
	$n = mysql_num_rows($r);
	$i = 0;
	while($i < $n){
		$recipie[mysql_result($r, $i, "recipieId")] = mysql_result($r, $i, "recipieName");
		$i++;
	}
	
	
	
	?>
	<h3>Modify Mix Design</h3><br />
	<form name="form">
	Select A Recipie: <select name="URL" onchange="window.location.href= this.form.URL.options[this.form.URL.selectedIndex].value">
	<option value="">Choose Me</option>
<?php
	foreach($recipie as $key => $value){
?>
		<option value="viewRecipies.php?id=<?php echo $key?>"><?php echo $value?></option>
<?php
	}
	
?>

</select>
<br />

</form>

<?php
	include("../footer.html");
	
}