Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

php mysql loop looses href

Posted on 2012-12-29
11
392 Views
Last Modified: 2012-12-30
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
0
Comment
Question by:Toube
11 Comments
 
LVL 13

Expert Comment

by:themrrobert
ID: 38729926
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
0
 
LVL 109

Expert Comment

by:Ray Paseur
ID: 38730067
I'm with themrrobert -- I cannot see enough information to help you: http://sscce.org/
0
 
LVL 77

Expert Comment

by:arnold
ID: 38730274
Look at the source of the results and you will see whether you have a mismatched quote.
0
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 

Author Comment

by:Toube
ID: 38730397
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.
0
 
LVL 77

Expert Comment

by:arnold
ID: 38730413
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.
0
 

Author Comment

by:Toube
ID: 38730421
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
0
 
LVL 77

Accepted Solution

by:
arnold earned 320 total points
ID: 38730427
I am looking at the div definitions that you have after the first line to make sure you do not overlay the div with the link.
Search for foorumiTiedotWrapper
You have multiple places where you have two or more sequential closing divs, though I am not seeing where you have a div within a div.  the display reflects the items as links, but without a way to get to the as far as clicking. I.e the button is under a glass. Such that the glass is preveting you from hitting the button.

Try the following. Modify your PHP code in the href loop by removing the padding-bottom or setting it to 0px versus 5px currently.
0
 

Author Comment

by:Toube
ID: 38730442
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?
0
 

Author Closing Comment

by:Toube
ID: 38730445
Thanks,
removing the padding solved my issue.
Great work.
0
 
LVL 77

Expert Comment

by:arnold
ID: 38730446
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?
0
 

Author Comment

by:Toube
ID: 38730462
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 :)
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Build an array called $myWeek which will hold the array elements Today, Yesterday and then builds up the rest of the week by the name of the day going back 1 week.   (CODE) (CODE) Then you just need to pass your date to the function. If i…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question