I was curious to know if i could do this, but found no examples on line
$info_find = mysql_query("SELECT info FROM sets WHERE category = '$selected_cat'")
or die( header ("location: index.php"));
Firstly doing it as above doesn’t work. Can it be done?
Are there any drawbacks?
die() just writes its parameter out, it doesn’t execute it. So a “or die()” construct will not help you there.
You can consider something like
with
if you are willing to accept the downsides of client-sided redirection