View Single Post
  #15  
Old 12-19-2008, 12:20 PM
 
AMMoyer AMMoyer is offline
 

Senior Member
  
Join Date: Nov 2008
Posts: 150
 

Default Re: Data passing between template and PHP file

This is the php file as it is now. The page still goes white and stays at ...xcart/mmy.php Is there some sort of conflict between the two $smarty->assign statements at the end? I am trying to pass the array from $rowMake into smarty and the back to mmy.tpl Thanks again.

Adam

Code:
<?php require "./auth.php"; $year = $_POST['year2']; ///////////////////////////////////////////////// make query for dropdown $query = sprintf("SELECT DISTINCT makeid, makename FROM iemmy WHERE yearid='$year'"); $result = @mysql_query($query); $rowMake = mysql_fetch_array($result); ///////////////////////////////////////////////// //do { //echo $rowMake['makeid']; //echo $rowMake['makename']."<br>"; //}while ($rowMake = mysql_fetch_array($result)); if (mysql_num_rows ($result) >= 1) { $makeid = array(); while ($rows = mysql_fetch_array ($result, MYSQL_ASSOC)) array_push ($makeid, $rows); $smarty->assign("makeid", $makeid); } $smarty->assign("main", "iesearch"); ?>
__________________
Adam
X-Cart Gold 4.4.5 - Live
X-Cart Gold 4.1.11 - Retired
X-Payments 1.0.4
CDSEO Pro
EWD Hosting
Reply With Quote