TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 03-26-2009, 08:38 PM   #1 (permalink)
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
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 02:20 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design