Jump to content

Registering Variable values as New variable


mrscsi

Recommended Posts

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;
}
}
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.