[development] an interface for legacy Flash forms

Rob Koberg rob at koberg.com
Sat Aug 21 01:33:38 UTC 2010


Hi,

Unless I am doing something incorrect (spent the day on it), I can't
get legacy Flash (swf) http form posts to be handled with Drupal. For
example, we have a custom swf avatar builder. The swf, onsubmit, does
a POST with a single parameter. (I don't have the source, but could
legally decompile it and add extra fields(?) for the form identifiers,
if that could help. I know less Flash than PHP)

I was thinking the easiest way to go would be to make a simple interface:

$DRUPAL/avatar.php

<?php

if (!empty($_POST)) {

	require_once './includes/bootstrap.inc';
	drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);

        $account = $GLOBALS['user'];
	dd('save $account: ' . $account);

	$avatar_xml = $_POST['avatarXML'];// it is url encoded
	dd('save $avatar_xml: ' . $avatar_xml);

} else {

        header('HTTP/1.1 405 Method Not Allowed');

}

I get the log entries written and the parameter value, but I don't get
a page user object.

What I want to do in this case is save a single profile field value,
'profile_avatar_xml' which is added at registration time with default
data. How can I get to the 'global $user;' (which I tried) object so I
can set: $user->profile_avatar_xml = $_POST['avatarXML'];

thanks,
-Rob


More information about the development mailing list