View Single Post
Old 03-26-2009, 08:38 PM   #1 (permalink)
dd-11
The Visitor
Newcomer 
 
Join Date: Mar 2009
Posts: 1
Thanks: 0
dd-11 is on a distinguished road
Default php, xml and forms

So I have a flash program that uses xml to get variables and text. I'm now building a front end in php (simplexml) so that users can edit the xml and change the flash. I can do this statically with magic numbers, but doing it dynamically I've hit a snag.

Users select what they want to edit via a standard drop down list, I'm using GET. So once the user makes a selection, I use:

$num = $_GET["num"];

I then do some html.

In here I've got another form with fields that are populated via the xml. I can do this statically, without problems, but trying to use the drop down to select the content is giving me problems.

<input value="<?php echo $vm->num[12]['building']; ?>" ... />

This works fine, as expected, but when I try to do something like this, I get a blank field.

<input value="<?php echo $vm->num[$num]['building']; ?>" ... />

OR

<input value="<?php echo $vm->num[$_GET["num"]]['building']; ?>" ... />

This is so simple, I can't think of why it's not working. Any help is greatly appreciated!
dd-11 is offline  
Reply With Quote