Solved

I need some help with this php code please

Posted on 2010-08-28
5
233 Views
Last Modified: 2012-05-10
Hi ,
With this page here:
http://www.testing.qsma.org.au/index.php?option=com_sobi2&sobi2Task=search&Itemid=61

You will see something that says Search our Events with a link saying Search going to this page.
http://www.testing.qsma.org.au/index.php?option=com_sobi2&sobi2Task=search&Itemid=64

I want the Search our Events to be the  hyperlink instead of the Search so I have tried to change this code:

$this->sobi2Header = $this->sobi2Header . "\n\t\t<td id=\"sobi2HeaderSearchLink\"> Search our Events {$searchLink} </td>";

to this

$this->sobi2Header = $this->sobi2Header . "\n\t\t<td id=\"sobi2HeaderSearchLink\"> <a href="index.php?option=com_sobi2&sobi2Task=search&Itemid=64>Search our Events </a></td>";

But that broke the code?

Can someone help me please?

Thanks
0
Comment
Question by:Amanda Watson
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 16

Expert Comment

by:HagayMandel
ID: 33548762
Try the same syntax the original code uses:

$this->sobi2Header = $this->sobi2Header . "\n\t\t<td id=\"sobi2HeaderSearchLink\">(<a href="index.php?option=com_sobi2&sobi2Task=search&Itemid=64>)Search our Events </a></td>";
0
 
LVL 16

Expert Comment

by:HagayMandel
ID: 33548765
Sorry, should be:
$this->sobi2Header = $this->sobi2Header . "\n\t\t<td id=\"sobi2HeaderSearchLink\">{<a href="index.php?option=com_sobi2&sobi2Task=search&Itemid=64>}Search our Events </a></td>";
0
 
LVL 2

Expert Comment

by:IngCharlie
ID: 33548767
You have got an error in the code missing " at the end of the href statement


$this->sobi2Header = $this->sobi2Header . "\n\t\t<td id=\"sobi2HeaderSearchLink\"> <a href="index.php?option=com_sobi2&sobi2Task=search&Itemid=64" >Search our Events </a></td>";
0
 
LVL 2

Accepted Solution

by:
IngCharlie earned 500 total points
ID: 33548787
Your code is also missing espace characters \
so it should look like this:

$this->sobi2Header = $this->sobi2Header . "\n\t\t<td id=\"sobi2HeaderSearchLink\"> <a href=\"index.php?option=com_sobi2&sobi2Task=search&Itemid=64\" >Search our Events </a></td>";
0
 
LVL 11

Author Closing Comment

by:Amanda Watson
ID: 33548832
I tried all three, the last one worked beautifully thanks
0

Featured Post

Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Read about how to choose the best possible content marketing agency to suit your needs. Content marketing has become an integral part of running a successful tech business, so it is wise to be informed.
These days socially coordinated efforts have turned into a critical requirement for enterprises.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question