Hey All,
Is it possible to assign a dynamic dropdown script to a $variable ??
The dropdown
$result = @mysql_query ("SELECT * FROM users WHERE is_group=0 AND deleted=0 ") or die ("Query Failed - Selecting Users". mysql_error()); // Run the query.
if(mysql_num_rows($result))
{
echo "<select id='assigned_user_name' name='assigned_user_name'{ASSIGNED_USER_NAME} style='position: absolute; left: 169; top: 314'>";
echo "<option>Select</option>";
while($row = mysql_fetch_assoc($result))
{
echo "<option value=$row[id]>$row[user_name]</option>";
}
}
else {
echo "<option>No Names Present</option>";
}
Working in SugarCRMs open source contact mgt sys (which employs php class 'XTemplate') I'm hoping to simply assign $the_dropdown_script to a template
$xtpl->assign("THE_DROPDOWN", $the_dropdown_script);
that may be called into the corrisponding file.html via {THE_DROPDOWN}, but I'm drawing a blank.
As you can see, I tried simply positioning the dropdown via the script, but this interferes with various hidden divs and such on load.