Breezing forms - Get datas from database

Copy the below code in your breezing forms by selecting your form,

Go to Advanced -> More options -> Select "Form scripts" -> After Form or Before form its up to your requirement.

// load the standard form creation utilities
$this->execPieceByName('ff_InitLib');

//set globals
global $record;

//query db
 $rows = ff_select("select * from `#__users`");

$html = '';
foreach ($rows as $row) $html .= "<div style='display:block'>
<input type='text' name='$row->user_id' id= '$row->user_id' value='$row->user_id' />
 </div>";
return $html;

It will return all the values from the users table.

Comments

Popular posts from this blog

Birthdate validation for less than 18 in PHP

Memcache Installation in PHP (Wamp Server)

Array to JSON