Avatar of Toube
Toube
 asked on

php mysql loop looses href

Hi,

I'm redesigning my site using divs and leaving out table design.
However I seem to have run in to trouble right in the beginning.

I printing out some information from Mysql database but for some reason it only gives me working (clickable) href on the first row:

see attachment for code.

Best regards,

Toby
example.txt
PHPMySQL Server

Avatar of undefined
Last Comment
Toube

8/22/2022 - Mon
themrrobert

For one, you need to change " & " to a normal  &  -- this might fix your issue completely, it will definitely help you later when you are wondering why the links aren't sending you the right info :p

Can we see the site in action? That would make it much simpler to diagnose
Ray Paseur

I'm with themrrobert -- I cannot see enough information to help you: http://sscce.org/
arnold

Look at the source of the results and you will see whether you have a mismatched quote.
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Toube

ASKER
Hi, thanks for your comments.
removing the & doesn't make any diffenrence and the links look ok in the source code.

here's the url to my intranet:

intra.tobiasfransman.net

User: guest
pass: guest321

After logging on you'll come directly to the problem page.

I have links on both left side and right side of the front page with same problem only first links of the rows works.
arnold

Your problem is that href points to uutiset/index.php is that a directory available relative to the PHP page?
I.e. it might need to be /uutiset/index.php
The & is being replaced by & you might want to recode & as %26 for URL encoding.

You are dealing with the right set of links starting with intra which is red/pink and works but every other link does not?

Checking.
Toube

ASKER
Hi Arnold and thanks for your suggestions.

Still only first row of output has a working link.. I use the same php code in my old site and there the links are working.. only thing that differs from the new code is that in the old site I use <table><tr> echo <td><a href> for the output.

-Toby
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
ASKER CERTIFIED SOLUTION
arnold

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Toube

ASKER
Hi,
the floating divs are somehow preventing the href links from working.
I'm using firefox html tidy for troubleshooting.
At the moment it's not complaining about any div etc. It showing 4 warnings at the moment.

So you are saying that i have a problem with my layout?
Toube

ASKER
Thanks,
removing the padding solved my issue.
Great work.
arnold

Not he layout, but it looks like the first links div is overlaying the next href.
It will not come up as an error if you layer one div atop another.

Specific reason for your use of padding?
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
Toube

ASKER
Hi,

no specific reason.. I was using it for testing and correcting some layout issues that I already fixed and I had forgot about the padding setting :)