Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

variable behaviour

Status
Not open for further replies.

caffrinho

MIS
Mar 1, 2002
91
GB
Not sure if i'm asking this in the right forum, but....

I have a problem with my website, in particular 1 page that seems to be behaving oddly. Part of the code for the page is below, the results can be seen at


Basically, the variable $lg only works for the first hyperlink, not the second.
On the site, roll over "sort by Player Name" and the link would take you to plxman.php?lg=euro04, but on the "sort by No." link, plxman.php?lg="".

I hope i'm making sense, and that somebody can provide some insight.

TIA

Caff.


Code:
$table = "
    <table  width=\"450\"
    		border=\"0\"
            cellspacing=\"0\"
            cellpadding=\"0\">
    <tr>
    	<td>&nbsp</td>
        <td colspan=\"3\">
        <font color=\"#006600\" size=\"-2\">
        Sort by
        <a href=\"plxman.php?lg=".$lg."&sortord=name\">
        	&nbspPlayer Name&nbsp
        </a>&nbspor&nbsp
        <a href=\"plxman.php?lg=".$lg."&sortord=cnt\">
        	&nbspNo.<br>
        </a>
        </td>
    </tr>";
 
D'oh. got it figured....
A bit hasty in posting this many apologies!!

spent aaaages looking at it, realised that $lg was being passed to the page, but a function was being called containing the code above.
Realising i had to pass the variable to the function, i changed the first link, but not the second. Got myself confused with different versions of the file at that point, locally and on host.

Anyway, sorry!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top