Jump to content

A Href Link Not Resolving


stickyladder

Recommended Posts

Hello, I'm new to coding. I just moved my php site to another server (linux). Now some of my links work and others don't. Please see sample of short file below. Please help, I'm desperate.

 

Note: on below code, the first link does not work, but the other two do. I can find no difference. The first one universityreport.php resolves to a blank page.

 

<snip>

 

 

<table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td width="1%"><img src="images/gray-box-left.jpg" width="11" height="84" /></td>

<td width="98%" background="images/gray-box-mid.jpg"><table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td align="left"><a href="universityreport.php"><img src="images/coll-card.jpg" width="265" height="61" border="0" /></a></td>

<td align="center"><a href="jobsearch.php"><img src="images/minority-bank.jpg" width="265" height="61" border="0" /></a></td>

<td align="right"><a href="registerempolyer.php"><img src="images/corp-portal.jpg" width="265" height="61" border="0" /></a></td>

</tr>

</table></td>

<td width="1%"><img src="images/gray-box-ryt.jpg" width="11" height="84" /></td>

</tr>

</table>

Link to comment
Share on other sites

All of the links, in actuality, work. They are all result in a document being requested by the browser, and they all then generate output. The problem is the output terminates early in the one that you perceive as not working. The problem is not with the link per se, but with the script being requested.

Link to comment
Share on other sites

The link you posted is to the login page. That implies that your universityreport.php page expects the visitor to be logged in and redirects to the login page when they are not.

 

Since the login.php page stops producing the html document before it outputs any visible content, your first step would be to troubleshoot why the code in login.php isn't doing anything after that point. The only way we could possibly help you do that would be if you post all the code for loigin.php (less any database connection details.)

Link to comment
Share on other sites

ok, this is becoming a bit more clear.. following please see code for login page..

 

 

 

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
require('includes/application_top.php');
require('includes/header_top.php');
include("includes/breadcrumb.php");
$user = new user(DB_CONNECTION);
$page=base64_decode($_REQUEST['next']);
if(isset($_POST['submit']) && $_POST['login'] && $_POST['password']){

if($user->login($_POST['login'],$_POST['password'])){
		if($_REQUEST['next']!="")
		  {
			//$page=base64_decode($_REQUEST['next']);
			header("Location:$page"); exit;
		  }
		  else
		  {
header("location:".generateURL('myaccount.php', true));
		  }
} else {
$error = 'You have entered invalid login details Or account not activated now.';
}
}
else if($_POST['submit']){
$error = "Please enter login details.";
}

?>

<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
 <tr>
<td><table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
	<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
	  <tr>
		<td>
			<!-- header logo -->

			<?php include('includes/headerlogo.php'); ?>
		 <!-- header logo -->
		</td>
	  </tr>
	  <tr>
		<td>
		<!-- header information --->
			 <?php include('includes/header.php'); ?>
		 <!-- header information --->
		</td>
	  </tr>
	  <tr>
		<td height="20"> </td>
	  </tr>
	  <tr>
		<td>
		<!-- header link --->
		 <?php include('includes/headerlink.php'); ?>
		<!-- header link --->
		</td>
	  </tr>
	  <tr>
		  <td align="left">
		 <?php
		$trail = new Breadcrumb();
		$trail->add('Login', $_SERVER['PHP_SELF'], 1,'Y');

		echo "
<style>
#breadcrumb ul li{
 list-style-image: none;
 display:inline;
 padding: 0 3px 0 0;
 margin: 1px 0 0 0;
 font-size:12px;
 color:blue;
}
#breadcrumb ul{
 margin:0;padding:0;
 list-style-type: none;
 padding-left: 1em;
}
</style>
";
		//Now output the navigation.
		$trail->output();
		?>
		</td>
	  </tr>
	   <tr>
							 <td colspan="2" align="center">   </td>
						 </tr>
	  <tr>
		<td>
		 <!--middle content --->

		 <table width="100%" border="0" cellspacing="0" cellpadding="0">
			 <tr>
				 <td width="50%" valign="top">
					 <table width="96%" border="0" cellspacing="0" cellpadding="0">
						 <tr>
							 <td height="19" colspan="2" class="menu-txt"><strong>RETURNING USERS SIGN IN</strong></td>
						 </tr>
						 <tr>
							 <td width="18%" height="76" valign="top" background="images/ico_folder_large.jpg" style="background-position:top left; background-repeat:no-repeat"> </td>
							 <td width="82%" valign="top" class="sml-blk-txt" align="justify">
								 <form action="<?php if($_REQUEST['next']!='') { echo('login.php?next='.$_REQUEST['next']); } else { echo generateURL('login.php', true); } ?>" method="post">

									 <table>
										 <?php
										 if($error)
											 echo '<tr><td  colspan="2"><span class="error">'.$error.'</span></td></tr>';
										 ?>
										 <tr>
											 <td>User Name or Email:</td>
											 <td><input type="text" name="login" /></td>
										 </tr>
										 <tr>
											 <td>Password:</td>
											 <td><input type="password" name="password" /></td>
										 </tr>
										 <tr>

											 <td align="center" colspan="2">
												 <input type="submit" class="green_btn" value="Sign In" />
											 </td>
										 </tr>
										 <tr>
											 <td align="center" colspan="2">

												 <a href="<?php generateURL('forgetpassword.php')?>">Forgot Password?</a>

											 </td>
										 </tr>
									 </table>
									 <input type="hidden" name="submit" value="submit" />
								 </form>
							 </td>
						 </tr>

						 <tr>
							 <td colspan="2" align="center">   </td>
						 </tr>

					 </table>
				 </td>
				 <td width="50%" valign="top">
					 <table width="96%" border="0" cellspacing="0" cellpadding="0">
						 <tr>
							 <td height="19" colspan="2" class="menu-txt">

							 </td>
						 </tr>
						 <tr>
							  <td width="18%" height="76" valign="top" background="images/ico_man_large.jpg" style="background-position:top left; background-repeat:no-repeat"> </td>
							  <td width="82%" valign="middle" class="sml-blk-txt" align="justify">
								  <a href="<?php if($page=="") { echo('registration.php');
										} elseif($page =="universityreport.php") { echo("reportcard.php"); } ?>" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image10','','images/get-starting1.png',1)">

								  </a>
							  </td>
						 </tr>
					 </table>
				 </td>
			 </tr>
		 </table>
		<!--middle content --->

		</td>
	  </tr>
	  <tr>
		<td> </td>
	  </tr>
	</table></td>
  </tr>
</table></td>
 </tr>
 <tr>
<td height="50" >
 <!--Foooter Content --->
 <?php include('includes/footer.php'); ?>
<!--Foooter Content --->
</td>
 </tr>
</table>

<?php include('includes/header_bottom.php'); ?>

Edited by PFMaBiSmAd
post code using code tags please
Link to comment
Share on other sites

ok, this is becoming a bit more clear.. following please see code for login page..

 

I'm glad it is for somebody ::)

 

Unless the issue is something that pops right out, this could be an all-day guessing game.

 

You need to ensure error_reporting is on and errors are being logged. That way, we've got something to work with.

Link to comment
Share on other sites

The reason I asked about the start of your file not being posted is because nothing you have posted contains the html that we have been mentioning that IS being output on that page.

 

Unfortunately, your code is trying to paste together the page by using php include/require statements. So, we still don't know exactly at what point your code is doing what you expect and at what point it is not.

 

So far, mrMarcus has suggested/asked that you set php's error_reporting to E_ALL and either set display_errors to ON or set log_errors to ON. The sooner you do this, the sooner the problem will get found.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.