Page 1 of 1

Problem with Links.. PHP

Posted: Tue Oct 25, 2005 6:45 am
by ronairis
feyd | Please use

Code: Select all

and

Code: Select all

tags where appropriate when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]


we're having a problem with our php site.. regarding the links.
it works well with our local server (localhost server:apache) but when we uploaded to our server.. the links wont work properly.

we are using these codes:
for our home.php

Code: Select all

<?php $imagedir = 'images/';?>
<?php include('includes/config.php')?>
<?php include('admin/function.php')?>
<?php include('vda/vdaemon.php')?>
<?php 
if($sesscheck > 0 && isset($_SESSION['atpm_level']) && $_SESSION['atpm_level'] <= 7){
	if(!isset($HTTP_GET_VARS['page'])){
		$page = 'inc_home.php';
		$pageb = 'inc_home_proc.php';
		}
	if(isset($HTTP_GET_VARS['page'])){
	$link = $_SERVER['PHP_SELF'].'?page='.$_GET['page'];
	if(isset($HTTP_GET_VARS['page'])){
		$page = 'inc_'.$_GET['page'].'.php';
		$pageb = 'inc_'.$_GET['page'].'_proc.php';
	}
}
$_SESSION['atpm_redirect']= html_entity_decode(geturl());
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title><?php echo $sitetitle?></title>
<link href="scripts/csses.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="scripts/jsses.js"></script>
</head>
<body>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="center" valign="top"><table width="80%"  border="0" cellspacing="0" cellpadding="10">
      <tr align="left" valign="top">
        <td width="200"><?php include('menu.php')?></td>
        <td><?php 
		if(file_exists($pageb) && file_exists($page)){
			include($pageb);
			include($page);
		}else {
			include('inc_home.php');
			}?></td>
      </tr>
    </table></td>
  </tr>
</table>
</body>
</html>
<?php VDEnd();
}//if logged in
else {
	$goto = 'index.php';
	gotoa(1, $goto, 0);
}?>
and for the links..

Code: Select all

<table width="100%" cellpadding="0"  cellspacing="0" class="forumline">
  <tr>
    <td align="left" valign="top"><table width="100%"  cellspacing="1" cellpadding="8">
      <tr>
        <th height="28" align="left" valign="middle" class="thHead" height->Welcome!</th>
      </tr>
      <tr>
        <td align="left" valign="middle" class="row1"><span class="gen"><?php echo data(1, $_SESSION['atpm_userid'], 'user','user_fname','user_id','Query user first name').'  '.data(1, $_SESSION['atpm_userid'], 'user','user_lname','user_id','Query user last name')?></span></td>
      </tr>
      <tr>
        <td align="left" valign="middle" class="row1"><a href="home.php" class="genmed"><img src ="images/home.jpg" border = "0"></a></td>
      </tr>
      <tr>
        <td align="left" valign="middle" class="row1"><a href="home.php?page=schedule&sked=4" class="genmed"><img src ="images/sched.jpg" border = "0"></a></td>
      </tr>
      <tr>
        <td align="left" valign="middle" class="row1"><a href="home.php?page=dtr" class="genmed"><img src ="images/dtr.jpg" border = "0"></a></td>
      </tr>
      <tr>
        <td align="left" valign="middle" class="row1"><a href="home.php?page=account" class="genmed"><img src ="images/account.jpg" border = "0"></a><a href="admin.php?page=user&do=add" class="genmed"></a></td>
      </tr>
      <tr>
        <td align="left" valign="middle" class="row1"><a href="process.php?page=logout" class="genmed"><img src ="images/out.jpg" border = "0"></a></td>
      </tr>
    </table></td>
  </tr>
</table>
help! what could possibly be wrong? tnx in advance.


feyd | Please use

Code: Select all

and

Code: Select all

tags where appropriate when posting code. Read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url][/color]

Posted: Tue Oct 25, 2005 11:46 am
by ronairis
help

Posted: Tue Oct 25, 2005 12:12 pm
by Jenk
That error message is telling you exactly what is wrong..

Posted: Tue Oct 25, 2005 3:14 pm
by John Cartwright
Where is the function gotoa?
PS. Learn to indent. Very dificult to read your code.