Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $keyword = trim($_GET["Keyword"]);
- if (!empty($keyword)) {
- $if_statement = ($keyword == $Product->keyword);
- }
- $shopByStore = $_GET["store"];
- if (!empty($shopByStore)) {
- $if_statement = ($if_statement && $shopByStore == $Product->store);
- }
- // plus 7 more GET methods retrieving potential user input for the $if_statement variable.
- $XMLproducts = simplexml_load_file("products.xml");
- foreach($XMLproducts->product as $Product) {
- if ($if_statement) { // the problem lies here
- echo $Product->name;
- }}
- if($Product->something) {} //this is meaningless and will throw and error
- //if you define $Product->something here
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement