i am trying to extract data from XML with xpath and php,but the xpath command is not parsing the string php var,thus am not getting back any result this is my php code
$term=$_POST["term"];
var_dump($term);
$xml = simplexml_load_file('Dbase.xml');
echo "$term";
$Movies = $xml->xpath('/Database/Movie[contains(Title,'$term')]');
foreach($Movies as $Movie) {
echo "Found {$Movie->Title}<br />";
echo "Found {$Movie->Cast}<br />";
echo "Found {$Movie->Producer}<br />";
}
i forgot to mention that a previous page containing a post form sends the data( i will use to search) in the input named "term"