PHPBB re populating the form with the $_POST data after submit -


i'm creating custom phpbb page. there various text fields in page , there "add ingredient" option. if fields filled in various information , ingredient added, form submitted add ingredient session. page refreshes @ point.

is there simple way re-populate text fields information had via $_post array? know information require in there 30+ fields thinking there must simpler/automated way of doing it, rather adding each individual variable template array , using if statements every field.

thanks :)

found answer myself...

foreach($_post $id=> $row){ $id=strtoupper($id); $template->assign_var($id, $row); } 

from there used {id_name} fill in values.

end result was

<!-- if id_name --> <input name="id_name" type="text" id="id_name" tabindex="1" value="<!-- if id_name -->{id_name}<!-- else -->60<!-- endif -->"/> 

the lower case name of element changed upper case in order populate it's value.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -