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 &quote;&lt;tr bgcolor=\&quote;$color\&quote;&gt;&lt;td&gt;&quote;.$count . '&lt;/td&gt;
&lt;td&gt;'.$row-&gt;name.'&lt;/td&gt;
&lt;td&gt;'.$row-&gt;organisation.'&lt;/td&gt;
&lt;td&gt;&lt;a href=\&quote;&quote;.$row-&gt;website.&quote;\&quote;&gt;&quote;. $row-&gt;website.&quote;&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href=&quote;processedit.html?stu_id=' .$row-&gt;stu_id. '&quote;&gt;edit&lt;/tr&gt;';
- I know for definate that it because I havent quoted the laste line properly but aint sure how to.

Currently

Code: Select all

website."\">". $row->website."
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

Code: Select all

website."">". $row->website."
prints in the website column.

Can Lilpunkstar or anyoneles see whats wrong with this code more specificaly the quotes.

Code: Select all

[/quote]

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!!