Hi folks....
I am really stuck and need a nudge.
If I take out the if/else conditions and start with FORM then I run fine. I am getting stuck with a parse error at the else clause.
Any help would be very appreciated.
Thanks,
Tim
<?
$i6link = db_connect();
$q = "select t1users from i6projects where id=$projectID";
$result = mysql_query($q,$i6link) or die (mysql_error());
if (empty($result)):
{
$q = "select handle from i6users where id = $result";
$result = mysql_query($q,$i6link) or die (mysql_error());
echo "$result";
}
else:
<form name="inviteuserform" method=post action="<?echo $i6global[httproot];?>/scripts/p_invite.php">
<input type=hidden name="i6f[projectID]" value="<?echo $projectID;?>">
<table border=0 cellpadding=4 cellspacing=0>
<tr><td align=left>
<select name="i6f[invitee]">
<?
$notArr1 = explode(",",$i6cp->users); // get rid of current users..
$notArr2 = explode(",",$i6cp->admins); // get rid of the project admin(s)..
$q = "SELECT id,login,handle FROM i6users WHERE ";
while ( list(,$val) = each($notArr1) ) { $q .= "id <> '$val' AND "; }
while ( list(,$val) = each($notArr2) ) { $q .= "id <> '$val' AND "; }
$q .= "id <> '000' AND type=1 ORDER BY handle";
$result = mysql_query($q,$i6link) or die (mysql_error());
while ($row = mysql_fetch_row($result)) {
echo "<option value=\"$row[0]\">$row[2] ($row[1])</option>\n";
}
?>
</select>
</td><td align=center>
<td align=left><input name="submitbutton" value="Invite" type=image src="http://localhost/inline6/images/btn_add_norm.gif">
</td></tr>
</table>
</form>
<?endif;?>