You are here: PHP, Smarty and XAJAX « All PHP « IT news, forums, messages
PHP, Smarty and XAJAX

Posted by tom on 05/31/06 20:50

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация