echo <a href> with php link

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

Post Reply
lilyminako
Forum Newbie
Posts: 7
Joined: Thu Mar 16, 2006 10:20 pm

echo <a href> with php link

Post by lilyminako »

evening....
i need some help in echo using <a href> with php created link...

i got 2 statement

1. echo $row["Vehicle_Ref_No"];

2. echo "<td height=\"20\"><a href=".$template["vehicleviewurl"].">" .$row["Vehicle_Ref_No"]."</a></td>\n";


the first statement output the data in row Vehicle_Ref_No...but the second statement didnt output anything...i wonder wether becos of the usage of <a href> wrongly....

can sm 1 help me?? :(
thanx alot
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

What errors are you getting? If you're not getting an error, what does the HTML look like?
lilyminako
Forum Newbie
Posts: 7
Joined: Thu Mar 16, 2006 10:20 pm

Post by lilyminako »

i get no error , that make me headache....the column for statement 2 didnt have any data at all.... :(
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

So what HTML does it output?
lilyminako
Forum Newbie
Posts: 7
Joined: Thu Mar 16, 2006 10:20 pm

nothing....

Post by lilyminako »

it output nothing....
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

I don't believe that. It must be either outputting an error or some variation of "<td height="20"><a href=></a></td>".

Note: I said HTML .. you'll need to view the source of the page .. I realise it might look blank.
lilyminako
Forum Newbie
Posts: 7
Joined: Thu Mar 16, 2006 10:20 pm

sorry...

Post by lilyminako »

first of all, i need to say sorry......

yes it does output data....the problem was the css file....i didnt change the color....it was white...
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

lol .. it happens to us all .. always check the HTML source first to see what is actually happening.
Post Reply