Page 1 of 1
hyperlinking - what a pain in the *****
Posted: Tue Apr 19, 2005 8:23 am
by mohson
Okay maybe ive been staring at this screen toooo long and am hungry but for some reason I cant even manage to hyperlink an echoed result
Code: Select all
echo "<tr bgcolor=\"$color\"><td>".$count . '</td>
<td>'.$row->name.'</td>
<td>'.$row->organisation.'</td>
<td>'. $row->website.'</td><td>';
all I want ot do is to make website appear as a hyperlink and evey combination I have tried has faied to do this!!
please can someone help my weary eyes.
Posted: Tue Apr 19, 2005 8:28 am
by feyd
you don't have the required anchor tag to make it a link..

Posted: Tue Apr 19, 2005 9:42 am
by mohson
Thanks I know, Ive tried adding the ancho tag
<a href=*****</a> but for some reason it doesnt lik the way im doing it - this is silly I have done this numerous times before anyone care to show me how its done correctly
Posted: Tue Apr 19, 2005 9:54 am
by d3ad1ysp0rk
You're switching from double quotes to single like halfway through.. Why?
Code: Select all
echo "<tr bgcolor=\"$color\"><td>".$count . "</td>
<td>".$row->name."</td>
<td>".$row->organisation."</td>
<td><a href=\"".$row->website."\">". $row->website."</a></td><td>";
Posted: Tue Apr 19, 2005 10:36 am
by mohson
Doh!!! Strange but it never occurred to me - anyway - Thanks!! I followed the same prinicipal on the following line of code but again the blank screen
Code: Select all
echo "e;<tr bgcolor=\"e;$color\"e;><td>"e;.$count . '</td>
<td>'.$row->name.'</td>
<td>'.$row->organisation.'</td>
<td><a href=\"e;"e;.$row->website."e;\"e;>"e;. $row->website."e;</a></td>
<td><a href="e;processedit.html?stu_id=' .$row->stu_id. '"e;>edit</tr>';
- I know for definate that it because I havent quoted the laste line properly but aint sure how to.
Currently
prints in the website column.
Can Lilpunkstar or anyoneles see whats wrong with this code more specificaly the quotes.
Posted: Tue Apr 19, 2005 10:37 am
by vigge89
This is not a PHP-related problem from what I can see, and neither is your previous threads problems.
I think you should start with stripping out any php-code so you can see what you're generating html-wise. You could also look at the output (view the page in a web browser, and choose to view the source code).
Posted: Tue Apr 19, 2005 10:39 am
by mohson
mohson wrote:Doh!!! Strange but it never occurred to me - anyway - Thanks!! I followed the same prinicipal on the following line of code but again the blank screen
Code: Select all
echo "<tr bgcolor="$color"><td>".$count . '</td>
<td>'.$row->name.'</td>
<td>'.$row->organisation.'</td>
<td><a href="".$row->website."">". $row->website."</a></td>
<td><a href="processedit.html?stu_id=' .$row->stu_id. '">edit</tr>';
- I know for definate that it because I havent quoted the laste line properly but aint sure how to.
Currently
prints in the website column.
Can Lilpunkstar or anyoneles see whats wrong with this code more specificaly the quotes.
Posted: Tue Apr 19, 2005 10:40 am
by d3ad1ysp0rk
Once again, you keep switching to single quotes... STOP! Pick one and stick with it.
Code: Select all
echo "<tr bgcolor=\"$color\"><td>".$count . "</td>
<td>".$row->name."</td>
<td>".$row->organisation."</td>
<td><a href=\"".$row->website."\">". $row->website."</a></td>
<td><a href=\"processedit.html?stu_id=" .$row->stu_id. "\">edit</tr>";
Try that.
Posted: Tue Apr 19, 2005 10:44 am
by feyd
quoting yourself without any changes or additions is very pointless mohson.
Posted: Tue Apr 19, 2005 10:49 am
by mohson
Oh sorry but the reason I done that is because someone had replied to my previous question at the same time as I had written a new one , I quoted myself just incase people felt I was satisfied with a response that could be assumed to be the answer to my question.
Thanks Lilpunkskater - you people are such a great help!!