file upload - Symfony: form field access with no sfForm object -


i'm working on symfony project , developed form upload file , save info table in model. , didn't use sfform class implement form. here have form

<form name="new_file" action="<?php echo url_for('home/uploadfile');?>" method="post">     <input type="file" id="file">     <input  value="<?php echo $codigo_maestro?>" id="master_id">     <input  value="<?php echo $codigo_entidad?>" id="entity_id">     <input type="submit" value="upload"> </form> 

so i'm trying access fields of sumbited form in action function , don't know how :(

$request->getparameter('file'); $request->getparameter('master_id'); $request->getparameter('entity_id'); 

this code didn't work. please me solve this! how can access fields of form action??

you need add name form fields, that's name can access them via $request->getparameter().


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -