SMARTY, syntax error: unrecognized tag

Hello

I don’t understand why smarty don’t recognize my tags.

PHP,


<?php
require_once( "../config/config.inc.php" );
require_once("../opendb2.php");


if( isset($_REQUEST[ editid ]) && $_REQUEST[ action ] == "edit" ) {
	$editid = $_REQUEST[ editid ];
	//echo $profile_id;
}

/*
date_posted expiration gender ethnicity country state city zipcode agerange categories uniontext rate
listeddate email link_partial link_complete
title description email description
*/

if(isset($_POST['updateparse']))
{
	#$query="update `tbl_parsing_call` set parse_title='{$_POST[fname]}',parse_email='{$_POST[lname]}', parse_emailcontent='{$_POST[adname]}',parse_message='{$_POST[ademail]}' where id='{$editid}'";
	$query="update `castingcall` set title='{$_POST[title]}', email='{$_POST[email]}', description='{$_POST[description]}' where id='{$editid}'";	
	$DB->Execute($query);
		
	if(!$DB->Execute($query))	Redirect( "Updation Failed.", "viewparsingcalls.php" );
	else Redirect( "Parsing Calls modified Successfully.", "viewparsingcalls.php" );

} else {
	$sql = "SELECT * FROM castingcall WHERE castingid='$editid'";	
	$result = mysql_query($sql) or die(mysql_error() . ' SQL: '. $sql);
	$row = mysql_fetch_array($result);
		$editid = $row["castingid"];
		$title = $row["title"];
		$email = $row["email"];
		$description = $row["description"];

	$adminsmarty->assign("editid", $editid);		
	$adminsmarty->assign("title2", $title);
	$adminsmarty->assign("email", $email);
	$adminsmarty->assign("description", $description);

	$adminsmarty-> assign("delete_msg",$saved_delete);
	$adminsmarty-> assign("title", "Edit Parsing Calls" );
	$adminsmarty-> display('modules/admin/edit_parsecall.tpl');
}

?>

SMARTY,


{include file="common/admin_header.tpl"}
{include file="modules/admin/panelhome.tpl"}

{literal}
<script type="text/javascript" language="javascript">
function parseedit()
{
   if(document.adminreg.fname.value=='')   {
     alert("Please Enter Parse Title");
	 document.adminreg.fname.focus();
	 return false;
   }
   if(document.adminreg.lname.value=='')   {
     alert("Please Enter Email Address");
	 document.adminreg.lname.focus();
	 return false;
  }	 if(document.adminreg.adname.value=='')  {
     alert("Please Enter Email Content");
	 document.adminreg.adname.focus();
	 return false;
  }	
   if(document.adminreg.ademail.value=='')   {
     alert("Please Enter Message");
	 document.adminreg.ademail.focus();
	 return false;
  }	
  return true;
} 	
</script>
{/literal}

<td> </td>
<td width=85% valign=top>



			<table width=85% class=text cellpadding=3 cellspacing=5 border=0>

				<tr>

					<td width=10 />

					<td width="780">

						<div style="text-align: left; padding: 6px 6px 0 8px; background: url(images/head_block_green780.gif) no-repeat 0px 5px; font: bold 10px Verdana; color:#FFFFFF; height:20px; line-height:16px">Edit Parsing Calls</div>

						<div style="text-align: left; border-left: 2px solid #2AA181; border-right: 2px solid #2AA181; height:auto">

							<div style="padding: 10px 10px 10px 10px">

								<center>



									<form name="adminreg" method="post" onsubmit="return parseedit();">

									  <table cellspacing=1 cellpadding=3 border=0 width="70%" align="center">

										<tr>

										  	<td width="22%" align="left">Title </td>

											<td width="2%">:</td>

									  	  <td width="76%" align="left"><input name="fname" type="text" value="{title2}" size="65"></td>

										</tr>



										<tr>

											<td align="left">Email </td>

											<td>:</td>			

										  	<td align="left"><input name="lname" type="text" value="{email}" size="68"></td>

									    </tr>

								

										  <tr>

										  	<td align="left"> </td>

											<td>:</td>

										  	<td align="left"> </td>
										  </tr>

								

										  <!--<tr>

										  	<td>Password</td>

											<td>:</td>

										  	<td><input type="password" name="adpass" /></td>

										  </tr>-->



										  <tr>

											<td align="left">Job Description</td>

											<td>:</td>

										  	<td align="left"><textarea name="ademail" rows="8" cols="70">{description}
</textarea></td>

										</tr>

	

										<tr>

										  	<td align="center"> </td>

										    <td align="center"> </td>

										    <td align="left"><input type="submit" name="updateparse" value="Update" style="cursor:pointer;" title="Update Parser calls"/>

										

										

								          </td>

										</tr>

								   </table>

								</form>



							</center>

							</div>

						</div>

						<div><img src="images/foot_block_green.gif" height="6" width="780"></div>

					</td>

					<td width=10 />

				</tr>

			</table>

            <p>{include file="modules/admin/adminpanelbottomcode.tpl"}</p>
            <p> </p>

Error message,


Fatal error: Smarty error: [in modules/admin/edit_parsecall.tpl line 65]: syntax error: unrecognized tag 'title2' (Smarty_Compiler.class.php, line 583) in /home/onstaged/public_html/config/lib/smarty/libs/smarty.class.php on line 1095

Anyone out there please. any help.

thanks in adance.

{$title2}

You also did it for email. So once you fix that you need to go through the entire template and place a dollar sign before the name of you’ll get other errors.

Is there ahy particular reason your using smarty? Be warned smarty is slow for such a little benefit.

Thanks ODDZ

It works fien with the ‘$’ sign before the variable , but i don’t understand.
Can somewone explane?
funnybone:rofl: