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['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']; ?>" ... />
<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!
|All times are GMT. The time now is 03:40 PM.|
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0