Jump to content

Archived

This topic is now archived and is closed to further replies.

DarkHavn

Displaying Results

Recommended Posts

Hey, i currently have a search that displays results, but instead of displaying results it displays an image relating to the results, and when they click on the image they go to a page that has some further information.

Now my question is, i have a loop retreiving all the information + images and echoing out the images.

Now i'm stuck as i want to display for images across, and about 5 images downwoods.

example [ ] = an image

[ ] [ ] [ ] [ ] (four images across)
[ ] [ ] [ ] [ ]
[ ] [ ] [ ] [ ]
[ ] [ ] [ ] [ ]
[ ] [ ] [ ] [ ]
(Five images down)

i can put the images inside a div, as the loop is echoing out the information.

How can i go about having it set up like this?

If you need any information please just ask, the script is abit big, but heres the script anyway

[code]
if($_POST['submitsearch'] && empty($_POST['search'])){
$error =  "Please enter words for the search";
} else {

connect();
$newkey = $_SESSION['keyword'];


//echo "Searching for $newkey";
$query = "SELECT * FROM catalogue WHERE `keywords` LIKE '%$newkey%'";
  //$query = "SELECT * FROM catalogue WHERE `keywords`='$keyword'";
$result = mysql_query($query);

if(mysql_num_rows($result) >= 1){
$x = 0;
while($rows = mysql_fetch_assoc($result)){
$x++;
$values[$x] =  $rows['identifier'];
$pictures[$x] = $rows['images'];
$buisness[$x] = $rows['Buisness'];

$value = ',';
$loc = strpos($value , $pictures[$x]) . ' <Br/>';
$word[$x] = substr(strrchr($pictures[$x], $value), 1);

//$images[x] = $word;
//$word = substr($pictures[$x], $loc);
//echo $word[$x] . "<br/>";



//echo "$dir";

echo "<a href='info.php'><img src='../Clients/$buisness[$x]/images/test.jpg' style='position:relative; float:none; left:460px; z-index:1; top:110px;'><a/> ";

//echo $values[$x] . " " . $pictures[$x] . " " . $buisness[$x] . "<br/>";
//$_SESSION['access'] = false;
}
}
}
[/code]

Please guys im stuck like all hell here

Share this post


Link to post
Share on other sites
Please don't bump your topic so quickly. Wait 4 to 8 hours. Give people time to look at it, and figure out what you want...

Ken

Share this post


Link to post
Share on other sites
[quote author=DarkHavn link=topic=107732.msg432530#msg432530 date=1158039798]
Well since other people can bump there posts and get away with it.
[/quote]

Sure, you post when it's midnight on the east coast of America, and the middle of the night in Europe and then you want to bump your post because nobody answered in half an hour.  Here's a hint ... ever wonder if displaying the results in a table and counting td cells to determine when to start a new row would help?

Share this post


Link to post
Share on other sites
Cheers for that, apologies for bumping up the post.

Just that everyone else was getting replies and alittle help, and all i was asking was for alittle direction.

Apologies again, will try that idea.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.