Jump to content


Photo

Registering Variable values as New variable


  • Please log in to reply
No replies to this topic

#1 mrscsi

mrscsi
  • New Members
  • Pip
  • Newbie
  • 1 posts

Posted 07 April 2006 - 07:25 PM

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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users