darsh999
-
Posts
8 -
Joined
-
Last visited
Never
Posts posted by darsh999
-
-
I think you must go out with this coding $home = $_SERVER["DOCUMENT_ROOT"];
it will never give you problem in future..
-
Acc. to me this problem occurs when Apache was unable to restart, it return an error message"just restart these aproxies"
-
You are right their is nothing wrong in your computer right. I can ping them from the server but If I vnc onto the box and try and view their pages from firefox but the can not open but they are visible in internet explorer try this...
-
There must be some problem in PHB .just download the latest version or upgrade them..
-
You should restart the apachee and if it tis dosent work then there must be some problem in system...
-
i think much is not left to say ..... but in all ur site is pretty good.
PHP script problem
in PHP Coding Help
Posted
ob_start();
include"header.php";
$no=1;
$sp=0;
$qpage="select *, titan.date as display_date from titan, member
WHERE titan.member_id=member.member_id
order by titan_id";
$rs_page=mysql_query($qpage);
$cnt=mysql_num_rows($rs_page);
$totalpage=ceil($cnt/10);
if(isset($_GET['pageno']))
$no=$_GET['pageno'];
$sp=($no*10)-10;
if(!$by) {
$by = 'titan_id';
}
//echo $sortby;
$sql="SELECT *, titan.date as display_date, titan.status as display_status FROM titan, member
WHERE titan.member_id=member.member_id
order by $by $sort
limit $sp,10 ";
//$sql= "select * from site_user where type!='admin'order by pk_id limit $sp,10";
$result=mysql_query($sql);
?><head>
<script>
function chkDel(getId)
{
if(confirm("Are you sure want to delete this user?"))
{
location.href="delete_titan.php?id="+getId;
}
}
</script>
</head> <table align="center" border="0" cellpadding="0" cellspacing="0" width="850">
<tbody><tr>
<td class="border" bgcolor="#ffffff" valign="top" width="850"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="196" align="left" valign="top"><?
include"left_nav.php";
?></td>
<td valign="top">
<form name="form" action="crm_submit.php" enctype="multipart/form-data" method="post">
<table align="center" bgcolor="#ffffff" border="0" cellpadding="2" cellspacing="2" width="95%">
<tbody>
<tr>
<td valign="top" bgcolor="#666666"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><span class="style3"><strong>Manage Titan Poker </strong></span></td>
<td><div align="right"><a href="add_customer.php" class="menu"></a></div></td>
</tr>
</table></td>
</tr>
<tr>
<td valign="top" width="68%"><table width="100%" border="0" class="buttons" align="center" cellspacing="1" bgcolor="#f5f5f5" style="border:#999999 solid 1px;">
<tr align="left" valign="middle">
<?
if($sort=="asc")
{
$newsort = 'desc';
} else {
$newsort ="asc";
}
?>
<td width="11%" height="23" >Sl.No.</td>
<td width="15%" >
<a href="manage_titan.php?sort=<? echo $newsort; ?>&by=titan_username">Titan User Name</a>
</td>
<td width="18%" >
<a href="manage_titan.php?sort=<? echo $newsort; ?>&by=titan_name">Titan Screenname</a>
</td>
<td width="16%" >
<a href="manage_titan.php?sort=<? echo $newsort; ?>&by=titan_email">Titan Email</a>
</td>
<td width="16%" >
<a href="manage_titan.php?sort=<? echo $newsort; ?>&by=titan.date">Date</a>
</td>
<td width="11%" >
<a href="manage_titan.php?sort=<? echo $newsort; ?>&by=member_email">Username</a>
</td>
<td width="11%" >
<a href="manage_titan.php?sort=<? echo $newsort; ?>&by=ip">Ip</a>
</td>
<td width="11%" >
<a href="manage_titan.php?sort=<? echo $newsort; ?>&by=titan.status">Status</a>
</td>
<td width="11%" >Action</td>
</tr>
<?
$i=0;
while ($rs = mysql_fetch_array($result))
{
$i++;
if($i%2 == 0)
$bgcolor = "#f6f6f6";
else
$bgcolor = "#DBDBDB";
?>
<tr>
<td class="bodytext" bgcolor="<?=$bgcolor?>" height="23">
<?=$i;?>. </td>
<td class="bodytext" bgcolor="<?=$bgcolor?>">
<?=$rs['titan_username'];?> </td>
<td class="bodytext" bgcolor="<?=$bgcolor?>">
<?=$rs['titan_name'];?> </td>
<td width="16%" class="bodytext" bgcolor="<?=$bgcolor?>">
<a href="mailto:<?=$rs[titan_email]?>"> <?=$rs['titan_email'];?></a></td>
<td width="16%" class="bodytext" bgcolor="<?=$bgcolor?>">
<?=$rs['display_date'];?></td>
<td width="11%" bgcolor="<?=$bgcolor?>">
<?
//$member_id=$rs['member_id'];
//$sql_site="select * from member where member_id=$member_id";
//$result_site=mysql_query($sql_site);
//$rs_site=mysql_fetch_array($result_site);
?><a href="view_customer.php?id=<?=$rs['member_id'];?>"><? echo $rs['member_email'];?></a></td>
<td width="16%" class="bodytext" bgcolor="<?=$bgcolor?>">
<?=$rs['ip'];?></td>
<td width="16%" class="bodytext" bgcolor="<?=$bgcolor?>">
<?
if($rs['display_status']==1)
echo "Accepted";
else if($rs['display_status']==2)
echo "Declined";
else
echo"Pending";
?></td>
<td width="11%" class="bodytext" bgcolor="<?=$bgcolor?>"><a class="red_small_links" href="edit_titan.php?id=<?=$rs['titan_id'];?>">Edit</a>
/<a class="red_small_links" href="#" onClick="chkDel('<?=$rs[titan_id]?>');">
Delete </a></td>
</tr>
<?
}
?>
</table></td>
</tr>
<tr>
<td valign="top" align="center">
Pages
<?
if($totalpage > 9) {
if(!isset($_GET['pageno'])) {
$_GET['pageno'] = 1;
}
if($_GET['pageno'] <> 1) {
echo" <a href='manage_titan.php?" . "sort=" . $sort . "&by=" . $by . "&pageno=" . ($_GET['pageno'] - 1) . "' class='bodytext'>Previous</a>";
echo" <a href='manage_titan.php?" . "sort=" . $sort . "&by=" . $by . "&pageno=1' class='bodytext'><<</a>";
}
if($_GET['pageno'] > 4 AND $_GET['pageno'] < $totalpage-4) {
for($i=$_GET['pageno']-4;$i<=$_GET['pageno']+4;$i++)
{
if($i==@$_GET['pageno'])
{
echo $_GET['pageno'];
}
else
{
echo" <a href='manage_titan.php?" . "sort=" . $sort . "&by=" . $by . "&pageno=$i' class='bodytext'>".$i."</a>";
}
}
} else if($_GET['pageno'] <= 4) {
for($i=1;$i<=9;$i++)
{
if($i==@$_GET['pageno'])
{
echo $_GET['pageno'];
}
else
{
echo" <a href='manage_titan.php?" . "sort=" . $sort . "&by=" . $by . "&pageno=$i' class='bodytext'>".$i."</a>";
}
}
} else if($_GET['pageno'] >= $totalpage-4) {
for($i=$totalpage-8;$i<=$totalpage;$i++)
{
if($i==@$_GET['pageno'])
{
echo $_GET['pageno'];
}
else
{
echo" <a href='manage_titan.php?" . "sort=" . $sort . "&by=" . $by . "&pageno=$i' class='bodytext'>".$i."</a>";
}
}
}
if($_GET['pageno'] <> $totalpage) {
echo" <a href='manage_titan.php?" . "sort=" . $sort . "&by=" . $by . "&pageno=" . ($totalpage) . "' class='bodytext'>>></a>";
echo" <a href='manage_titan.php?" . "sort=" . $sort . "&by=" . $by . "&pageno=" . ($_GET['pageno'] + 1) . "' class='bodytext'>Next</a>";
}
} else {
///-----------------------------------
for($i=1;$i<=$totalpage;$i++)
{
if($i==@$_GET['pageno'])
{
echo $_GET['pageno'];
}
else
{
echo" <a href='manage_titan.php?" . "sort=" . $sort . "&by=" . $by . "&pageno=$i' class='bodytext'>".$i."</a>";
}
}
///-----------------------------------
}
?></td>
</tr>
</tbody>
</table>
</form></td>
</tr>
</table></td>
<td background="images/right.jpg" width="9"><div align="right"></div>
</td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
</tbody></table>
<?
include"footer.php";
?> In this i can find many mistakes in programming if the programing in incorrect how can you make a software or anything...