Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

I need some help with this php code please

Posted on 2010-08-28
5
Medium Priority
?
246 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 2000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

In this blog, I will share you some basic tips for content marketing and to rank your website on Google.
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
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.

670 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