PHP, Smarty and XAJAX
- From: tom <tom@xxxxxxxxxx>
- Date: Wed, 31 May 2006 22:50:52 +0200
Hi,
I try to use ajax in my script (php and smarty). I've decided on XAJAX Framework:
http://www.xajaxproject.org/
Anyone use this, especially with smarty?
Well, I did, but I have some problem with presentation data from database...
I get from DB some data, eg. Projects, and I want to print every it name in smarty tpl file. Without XAJAX it's look like this:
require('classes/projects.class.php'); require('classes/projectsMapper.class.php');
$mysql = new db(....);
$ProjectMapper = new projectsMapper($mysql);
$Project= $ProjectMapper->findAll(); /*this methd get from database all of my projects*/
//now I have an array of project objects in $Project variable
$smarty->assign('Project', $Project);
$smarty->display('sample.tpl');
....and tpl file:
....
{section name=i loop=$Project}
<tr>
<td class="table1cell">{$Project[i]->ProjectName}</div>
</td>
</tr>
{/section}
....
How to do this in XAJAX - how to show multiple value from array when I submit some form?
I want to use XAJAX in search engine - for egxample, I have a form with input field and user can there write name of project and on submit I search in DB every projects that name pass to pattern and print it like above, but of course in with XAJAX...
please help
jerry
.
- Follow-Ups:
- Re: PHP, Smarty and XAJAX
- From: tom
- Re: PHP, Smarty and XAJAX
- Prev by Date: Re: Help with form and post!
- Next by Date: Re: PHP, Smarty and XAJAX
- Previous by thread: LF: PHP Coder for Registration and admin project
- Next by thread: Re: PHP, Smarty and XAJAX
- Index(es):