On Tuesday, June 26, 2012 3:53:46 PM UTC+2, Ditshwanelo wrote:
--Im trying to populate data from database bt isnt,im a begginer sory for a lame questionfunction download()
{
$urlquery = $this->Newsletter->query("SELECT url,image_url,year,season FROM newsletters WHERE status='Active'");
foreach($urlquery as $URL)
{
//echo '<a href="/".$hyperlink."/"><img src="images/pdf.PNG"/><br/></a>';
// echo '<a href=".$hyperlink.">Newsletters<br/></a>';
//variables
$hyperlink=$URL['Newsletter']['url'];
$year=$URL['Newsletter']['year'];
$season = $URL['Newsletter']['season'];
$image_url=$URL['Newsletter']['image_url'];
print_r($season);
echo'<table width="350" border="1" cellpadding="0" cellspacing="0" >
<th>Year</th><th>Season</th><th>Download Newsletter</th>';
echo'<tr>';
echo"<td>$year</td>";
echo"<td>$season</td>";
echo '<td><a href=".$hyperlink."><img src=".$image_url."/><br/></a></td>';
echo'</tr>';
echo'</table>';
}
//print_r($y);
}
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php
No comments:
Post a Comment