There’s my problem i’m a beginner with php thing and I’m stuck to put in place a pages with links that goes from a grid image with categories to a grid of image with the content of that categories. For example I have a home page with Italian, French and chineses recipies displayed with flags of that countries and if a visitor click on a particular flag the recipies from that category will in a page called category.php. I’m using a Mysql DBMS Can someone please tell me how to handle this.
Here's an example of link I came with:
<a href="<?php specialité?specialite=1 ?>"><img id="im" class="img-responsive img-circle" src="images/france.png"></a>
use as below,
<a href="category.php?<?php echo specialité?specialite=1 ?>"><img id="im" class="img-responsive img-circle" src="images/france.png"></a>
then
category.php
<?php
$specialité = $_POST['specialité'];
if(isset($_POST['specialité'])){
# call mysql using $_POST['specialité']
# select table and get country related page and load page
header("Location:your db_value");
}
or if you know POST ids use switch operator
switch($_POST['specialité']){
case 1:
//call mysql
break;
case 2:
//call mysql
break;
case 3:
//call mysql
break;
}