Solved

I need some help with this php code please

Posted on 2010-08-28
5
226 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
  • 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

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.
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.

746 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now