Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 250
  • Last Modified:

I need some help with this php code please

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
Amanda Watson
Asked:
Amanda Watson
  • 2
  • 2
1 Solution
 
HagayMandelCommented:
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
 
HagayMandelCommented:
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
 
IngCharlieCommented:
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
 
IngCharlieCommented:
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
 
Amanda WatsonAuthor Commented:
I tried all three, the last one worked beautifully thanks
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now