mrscsi Posted April 7, 2006 Share Posted April 7, 2006 What I am trying to do is read in an xml file (working just fine).Scan element children, and based on element->data value, set the data value as new variable.Then accept post from html page with values to those NEW variables.Heres my code so far:$file = "comps.xml";$xml = simplexml_load_file('comps.xml');foreach ($xml->group as $group) { if ($group->uservisible=="true"){ pt_register('POST',$group->id); //ya I know -don't register globals, I'll change it when it works. }} // these variables have been set in a different html file as check box input, so the post should be // $group->id=on // this next part is where I'm stuck.foreach ($xml->group as $group) { if ($group->uservisible=="true"){ if ($group->id=="on") { // this is the part that doesn't work. the value is still the data from the // xml file element, not the html post. echo $group->name; } }} Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.