Solved

I need some help with this php code please

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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

These days socially coordinated efforts have turned into a critical requirement for enterprises.
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
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…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

630 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