i want do something to show last tickets in site
for example i have folder /whmcs and my site is examble.com/
i want show tikets from whmcs. i use this code to get first name and show form for log in at my site, but in info at user want add last tikets or show last tiket name and link for the ticket.
how to do that??
<?php
include("../whmcs/dbconnect.php");
if ($_SESSION['uid']) {
$result = mysql_query("SELECT firstname FROM tblclients WHERE id='".$_SESSION['uid']."' LIMIT 1;");
while($row = mysql_fetch_array($result))
echo "<div class='after'><p id='login'><span>".$_LANG['welcomeback'].', '.$row['firstname'].' <br /><a href="../sup/clientarea.php">'.$_LANG['clientareatitle'].'</a> | <a href="../sup/submitticket.php">اضف تذكرة</a></span></p><div class="out"><a href="../sup/logout.php">خروج</a></div></div>';
}else{
echo '<div class="before">
<form action="../sup/dologin.php?goto=clientarea.php" method="post">';?>
<input type="hidden" name="token" value="" />
<input type="text" name="username" id="username" value="البريد الالكتروني" onblur="if (this.value=='')this.value='البريد الالكتروني'" onclick="value=''" />
<?php
echo '<input name="password" id="password" type="password" value="" />
<label><div class="rememberme">تذكرني</div>
<input type="checkbox" name="rememberme" />
<span class="state"></span>
</label>
<input type="submit" value="دخول" />
</form>
<a href="../sup/pwreset.php" class="lost" title="نسيت كلمة المرور؟">نسيت كلمة المرور؟</a>
<a href="../sup/register.php" title="التسجيل">التسجيل</a>
</div>';
}
?>