php - Defining A Custom Class with Text Input values -
php - Defining A Custom Class with Text Input values -
i have question masses out there regarding trying input values text input box custom class. have custom class named company properties correspond values in mysql database.
so created input ui on client application calls out address, name, zip, phone, etc. - there button submit values database creation. here's question:
how take each individual textinput.text property , 'mesh' them company object send server? php written takes in argument this:
public function createnewcompany (company $item) { ....... so right way send them in? or???
there total of 11 things (properties) need submitted. usual - help appreciated.
thank in advance time , assistance!
-cs
here's illustration think you'll find helpful :
http://wadearnold.com/blog/zend-amf-links
if take peek @ that, it's doing exact type of stuff you're trying do, clearly. i'll summarize of the basic parts you...
what need transfer input's value object , send object off server.
a value object object create holds values (great name, eh?) map object of similar properties on end remoteclass call:
package { [bindable] [remoteclass(alias="contactvo")] public class contactvo { public var id:int; public var firstname:string; public var lastname:string; public var email:string; public var mobile:string; } } on server have same value object definition:
<?php class contact { public $id = 0; public $firstname = ""; public $lastname = ""; public $email = ""; public $mobile = ""; } ?> as transport, you're going utilize remoteobject transports requests endpoint:
<declarations> <remoteobject endpoint="http://localhost/" id="myservice" fault="faulthandler(event)" source="contactdao" destination="zend"> <method name="getcontacts" result="contactshandler(event)" /> </remoteobject> </declarations> this maps method on backend, in contactdao.php in case :
<?php require_once 'contact.php'; class contactdao { function createcontact( $contact ) { ... } } ?> php mysql flex serialization flash-builder
Comments
Post a Comment