PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
mohson
Forum Contributor
Posts: 372 Joined: Thu Dec 02, 2004 6:58 am
Location: London
Post
by mohson » Tue Apr 19, 2005 8:23 am
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.
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Tue Apr 19, 2005 8:28 am
you don't have the required anchor tag to make it a link..
mohson
Forum Contributor
Posts: 372 Joined: Thu Dec 02, 2004 6:58 am
Location: London
Post
by mohson » Tue Apr 19, 2005 9:42 am
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
d3ad1ysp0rk
Forum Donator
Posts: 1661 Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA
Post
by d3ad1ysp0rk » Tue Apr 19, 2005 9:54 am
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>";
mohson
Forum Contributor
Posts: 372 Joined: Thu Dec 02, 2004 6:58 am
Location: London
Post
by mohson » Tue Apr 19, 2005 10:36 am
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.
Last edited by
mohson on Tue Apr 19, 2005 10:37 am, edited 1 time in total.
vigge89
Forum Regular
Posts: 875 Joined: Wed Jul 30, 2003 3:29 am
Location: Sweden
Post
by vigge89 » Tue Apr 19, 2005 10:37 am
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).
mohson
Forum Contributor
Posts: 372 Joined: Thu Dec 02, 2004 6:58 am
Location: London
Post
by mohson » Tue Apr 19, 2005 10:39 am
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.
d3ad1ysp0rk
Forum Donator
Posts: 1661 Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA
Post
by d3ad1ysp0rk » Tue Apr 19, 2005 10:40 am
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.
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Tue Apr 19, 2005 10:44 am
quoting yourself without any changes or additions is very pointless mohson.
mohson
Forum Contributor
Posts: 372 Joined: Thu Dec 02, 2004 6:58 am
Location: London
Post
by mohson » Tue Apr 19, 2005 10:49 am
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!!