<?php /* * Created on 2007/09/02 * * To change the template for this generated file go to * Window - Preferences - PHPeclipse - PHP - Code Templates */ header( "Content-Type: text/xml; charset=UTF-8" ); echo '<?xml version="1.0" encoding="UTF-8" ?>'; // button push ? if( isset( $_POST['btn'] ) ) { $view = "<action>"; // textarea if( isset( $_POST['txt'] ) ) { $txt = htmlspecialchars( $_POST['txt'] ); $view .= "<data>".$txt."</data>"; } // select $sel = $_POST['sel']; $view .= "<data>".$sel."</data>"; // select multiple $sels = $_POST['sels']; $view .= "<data>".$sels."</data>"; // radio $rd = $_POST['rd']; $view .= "<data>".$rd."</data>"; // checkbox $view .= "<data>"; $chks = ""; foreach( $_POST['chk'] as $chk ) { $chks .= $chks == "" ? "" : ","; $chks .= $chk; } $view .= $chks; $view .= "</data>"; $view .= "</action>"; echo $view; } ?>