Reply
Retreving data from mysql
Old 07-01-2009, 05:48 AM Retreving data from mysql
coldturkey's Avatar
Extreme Talker

Posts: 206
Name: Rachel
Location: Spain
Trades: 3
Hi all,
I am trying to retreve data from my mysql database, and then click on the data to go to a new page where the viewer will see all in that row.
This is the php

PHP Code:
    <?php
$query  
"SELECT * FROM sale where 1=1".$where_clause." order by id DESC";
$result mysql_query($query);
while(
$row mysql_fetch_array($resultMYSQL_ASSOC))
{
echo 
"<a href='for_sale_results.php?property={$row['id']}'>
<table width='560px'><tr><td><img class='sal_pic'  src='http://www.s-chavos.com/admin-seb/{$row['image1']}'></td><td>
<div class='sale'>
<strong>{$row['type']} - {$row['location']} - Ref: {$row['ref']}</strong> <br><br>
Bedrooms: <strong>{$row['bed']}</strong> - Bathrooms: <strong>{$row['bath']}</strong> - Pool: <strong>{$row['pool']}</strong> <br><br></div>
{$row['des_spanish']}</td><td><img class='sal_pic' src='http://www.s-chavos.com/admin-seb/{$row['image2']}'></td></tr></table></a>
<hr><br>"
;} ?>
It all works in Firefox, but in IE the link at the start of the table does not work, and you can not link to the next page.

Hope some one can help out
Thanks
Rachel
__________________
coldturkey is offline
Reply With Quote
View Public Profile Visit coldturkey's homepage!
 
 
When You Register, These Ads Go Away!
Old 07-01-2009, 11:30 AM Re: Retreving data from mysql
NullPointer's Avatar
Will Code for Food

Posts: 1,115
Name: Matt
Location: Irvine, CA
Trades: 0
PHP is server side code so it is not browser dependent. The problem is with your HTML. Take the resulting HTML and validate it.
__________________
Tinsology | How to Post Code | EverythingDev
NullPointer is offline
Reply With Quote
View Public Profile Visit NullPointer's homepage!
 
Old 07-01-2009, 11:44 AM Re: Retreving data from mysql
hairygunther's Avatar
Extreme Talker

Posts: 164
Trades: 0
It's easier than that to solve NP - dear lady, you have made a major html error, but I admire you for making it, it proves you didn't try and learn html from a book but by yourself. Forgive me for putting this in very big writing:

You cannot put an <a href... tag around a table!!! That's totally insane!!! I'm amazed it works on any browser at all!!! It's totally nuts.

(if you want it around the pictures, you'll have to put a full tag around each img tag) (and separate tags if you want it around any text also - don't be lazy and let things run on - and don't do insane things like putting a href tags around a table - that's insane - it's so insane, it's actually brilliant - you are actually a potential hacker - you have the basic qualification... the capacity to just do absolutely anything that comes into your head and give it a go...)


href tags around a whole table! I ask you. What would she do with a div, I wonder!
__________________
I acknowledge Parker out of Thunderbirds and Glaxo Industries.
hairygunther is offline
Reply With Quote
View Public Profile
 
Old 07-02-2009, 04:55 PM Re: Retreving data from mysql
Lashtal's Avatar
PHP Learner

Posts: 493
Name: Lashtal
Trades: 0
bleh, nevermind. lol
Lashtal is offline
Reply With Quote
View Public Profile
 
Old 07-07-2009, 12:37 PM Re: Retreving data from mysql
coldturkey's Avatar
Extreme Talker

Posts: 206
Name: Rachel
Location: Spain
Trades: 3
Glad I amussed you! - But it worked in Firefox!!
Im going to change it and not be lazy!! Thanks
__________________
coldturkey is offline
Reply With Quote
View Public Profile Visit coldturkey's homepage!
 
Reply     « Reply to Retreving data from mysql
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.11138 seconds with 13 queries