Jump to content

link coding prob


scarezekiel

Recommended Posts

Ok so my problem is i need to change the page link. Now if i click on the link (marked with red) it will link to the company website. So, instead of going to the website. I want to change it to link to another page which i created named (oscar.php on my index.php). But without removing the company logo on it. This is my 1st time encounter this type of case since im very new.

 

this is the index

 

<?session_start();?>
<? 
include ('config.php'); 
include ('config_email.php'); 
include ('config_key.php'); 

?>



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title>asia programs</title>





<link rel="stylesheet" href="style.css" type="text/css" />
<script type="text/javascript" src="jquery/jquery.js"></script>

<script type="text/javascript" src="jquery/thickbox/thickbox.js"></script>
<link rel="stylesheet" href="jquery/thickbox/thickbox.css" type="text/css" />


<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>





<link rel="stylesheet" href="jquery/jquery.treeview.css" />
<script src="jquery/lib/jquery.cookie.js" type="text/javascript"></script>
<script src="jquery/jquery.treeview.js" type="text/javascript"></script>


<link rel="stylesheet" href="css/globalslide.css">



<style type="text/css">        
#footer2 {                
position:absolute;                
bottom:0;                
width:100%;                
height:140px;       
background: #000;
opacity:0.9;
filter:alpha(opacity=92);
}        /* for moz/opera and others*/        
html>body 
#footer2{position:fixed}        
#footer2-inner{                height: 69px;                background-color: black;        }        /* margin-bottom ensures last content        is not obscured by footer */        
#content {                margin-bottom: 69px;        }</style>




</head>

<body>



<?

if(isset($_GET[view])) {
$view = $_GET[view];
}

if(isset($_GET[content])) {
$content = $_GET[content];
}

if(isset($_GET[ttid])) {
$ttid = $_GET[ttid];
}

if(isset($_GET[mod])) {
$mod = $_GET[mod];
}

if(isset($_GET[note])) {
$note = $_GET[note];
}


if ($ttid <> ''){
if ($content == 'tips') {
include (VIEWPAGE.'view_event_tooltip.php'); 
}
if ($content == 'tesm') {
include (VIEWPAGE.'view_event_testimonial.php'); 
}
if ($content == 'psevent') {
include (VIEWPAGE.'view_event_ps.php'); 
}
if ($content == 'oscar') {
include (VIEWPAGE.'view_event_description.php'); 
}
if ($content == 'prospectus') {
include (VIEWPAGE.'view_event_prospectus.php'); 
}
if ($content == 'speaker') {
include (VIEWPAGE.'view_event_speakerlist.php'); 
}

}
elseif ($ttid == ''){

?>
<div id="wrapper">
<? include ("header/header.php"); ?>
  <div id="main-content">

<?
if ($content== ''){
if ($view == ''){
include (VIEWPAGE.'home.php'); 
include ("counter.php");
}

if ($view == 'home'){
include (VIEWPAGE.'home.php'); 
}

if ($view == 'about'){
include (VIEWPAGE.'view_aboutus.php'); 
}

if ($view == 'sponsorship'){
include (VIEWPAGE.'view_sponsorship.php'); 
}



if ($view == 'gallery'){
include (VIEWPAGE.'view_gallery.php'); 
}

if ($view == 'subgallery'){
include (VIEWPAGE.'view_subgallery.php'); 
}

if ($view == 'news'){
include (VIEWPAGE.'view_news.php'); 
}

if ($view == 'subnews'){
include (VIEWPAGE.'view_subnews.php'); 
}


if ($view == 'contact'){
include (VIEWPAGE.'view_contactus.php'); 
}

if ($view == 'enquirysubmit'){
include (VIEWPAGE.'view_enquiry_thankyou.php'); 
}

if ($view == 'career'){
include (VIEWPAGE.'view_career.php'); 
}

if ($view == 'event'){
include (VIEWPAGE.'view_event_search.php'); 
}

if ($view== 'spl'){
include (VIEWPAGE.'view_event_speakernote_list.php'); 
}
}


if ($view == 'home'){
if ($content== 'list'){
include (VIEWPAGE.'home.php'); 
}
}

if ($view == 'event'){
if ($content== 'list'){
include (VIEWPAGE.'view_event_searchlist.php'); 
}

}



if ($view == 'registration') {
include (VIEWPAGE.'view_event_registration.php'); 
}


if ($view == 'regmsgsuccess') {
include (VIEWPAGE.'view_event_registration_msgsuccess.php'); 
}

if ($view == 'regmsgerror') {
include (VIEWPAGE.'view_event_registration_msgerror.php'); 
}


if ($view == 'prospectus') {
include (VIEWPAGE.'view_event_prospectus.php'); 
}


if ($view == 'msgsuccess') {
include (VIEWPAGE.'view_event_prospectus_msgsuccess.php'); 
}

if ($view == 'msgerror') {
include (VIEWPAGE.'view_event_prospectus_msgerror.php'); 
}


if ($view == 'sn') {
include (VIEWPAGE.'view_event_speakernote.php'); 
}


if ($view == 'confirmation') {
if ($mod == 'reg') {
include (VIEWPAGE.'view_event_registration_insert.php'); 
}
if ($mod == 'pro') {
include (VIEWPAGE.'view_event_prospectus_insert.php'); 
}
if ($mod == 'note') {
include (VIEWPAGE.'view_event_speakernote_insert.php'); 
}
if ($mod == 'ec') {
include (VIEWPAGE.'view_event_speakernote_check.php'); 
}
if ($mod == 'ecspreg') {
include (VIEWPAGE.'view_event_speakernote_ecsuccess.php'); 
}
}





?>
  </div>
<? include ("footer/footer.php"); ?>
</div>

<?
if (($view == 'home')|| ($view == '')){
?>

<? }
} ?>
</body></html>

 

 

 

 

ok so this is the code for the page that i attached a photo of it

 



<?
if(isset($_GET[ttid])) {
$ttid = $_GET[ttid];
}

$connection=mysql_connect("$server", "$username", "$password")
or die("Could not establish connection");
mysql_select_db($database_name, $connection)
or die ("Could not select database");


$query = "select master_event.* , 
(DATE_FORMAT(event_datefrom, '%d %M %Y')) as datefrom,
(DATE_FORMAT(event_dateto, '%d %M %Y')) as dateto,
ucase(event_name) as eventname
from master_event
where master_event.event_id = '$ttid '";
$result=mysql_query($query);
while($row = mysql_fetch_array($result)){
$eventname = $row['eventname'];
$eventdesc = $row['event_desc'];
$companydescription = $row['company_description'];
$eventvenue = $row['event_venue'];
$eventfee = $row['event_fee'];
$datefrom = $row['datefrom'];
$dateto = $row['dateto'];

echo "<font color='#000000'  face='arial' ><b> $eventname </b> </font> <br>";
echo "<font color='#000000'  face='arial' ><i>Date</i> : $datefrom - $dateto <br>";
echo "<i>Venue</i> : $eventvenue <br>";

$querypstype = "SELECT DISTINCT master_pstype.pstype_id,  pstype_desc FROM master_pstype
		INNER JOIN master_psevent ON master_psevent.pstype_id= master_pstype.pstype_id
		where master_psevent.event_id = '$ttid'
		ORDER BY pstype_id";

$resultpstype=mysql_query($querypstype);
while($rowpstype = mysql_fetch_array($resultpstype)){
$pstypeid = $rowpstype['pstype_id'];
$pstypedesc = $rowpstype['pstype_desc'];
echo "<br><font color='#8B3A3A' size='1' face='georgia' ><b><i>$pstypedesc</i></b></font> <br>";

$queryps = "SELECT master_psevent.*, pstype_desc, company_name, company_link, company_description, logo_filename FROM master_psevent
		LEFT JOIN master_pstype ON master_psevent.pstype_id = master_pstype.pstype_id
		LEFT JOIN master_ps ON master_ps.ps_id = master_psevent.ps_id
		WHERE master_psevent.event_id = '$ttid' and master_pstype.pstype_id= '$pstypeid' 
		ORDER BY pstype_desc,company_name ";

$resultps=mysql_query($queryps);
while($rowps = mysql_fetch_array($resultps)){
$companyname = $rowps['company_name'];
$companylinkori = $rowps['company_link'];
$companydescription = $rowps['company_description'];
if ($companylinkori <> "") {
$companylink = "http://".$rowps['company_link'];
}
else
{
$companylink = "";
}
$logopath = $rowps['logo_filename']; 

if ($companylink <> ""){
echo "<font color='#4A708B'  face='arial' ><a href=$companylink style=\"color:white;text-decoration: none; \" target='new'><img src=".$logo_dir."/".$logopath." width=\"15%\"></img></a>&nbsp&nbsp</font>";
}
else
{
echo "<font color='#4A708B'  face='arial' ><img src=".$logo_dir."/".$logopath." width=\"15%\"></img>&nbsp&nbsp</font>";
}
?>

<br>
<?
}
echo "<br>";
}

}



?>

 

post-131669-13482403317607_thumb.jpg

Link to comment
Share on other sites

In your second file line 66 find this:

echo "<font color='#4A708B'  face='arial' ><a href=$companylink style=\"color:white;text-decoration: none; \" target='new'><img src=".$logo_dir."/".$logopath." width=\"15%\"></img></a>&nbsp&nbsp</font>";

You want to change this:

<a href=$companylink 

Use the full address of the page you want and inclose it in single quotes Like changing the link to go to google:

<a href='https://www.google.com/' 

 

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.