Hi,
I am trying to make a standard query to update forms in PhP - MySQL. Therefor I want to check wether a user has selected a certain option, or needs all data to be displayed. If he wants all data, I want to put in a searchvalue which basically means 'all'. I am not sure how to explain, so here is the code I am trying to get to work:
<?
// More code here...
If ($AllSub==1) { //If all subjects
$Sub = "%";
}
// What should I put between the quotes for the database to return all values for $Sub??
$Input_query = " where Subject.Subjects = '$Sub' ";
// More code here
?>
Hop e I made things more or less clear.