Jump to content

Archived

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

simon157

Sql help

Recommended Posts

I have a nature website which uses php to search databases. I am currently adding a option for displaying images by thumbnails. I currently have some radio buttons where the user selects a letter and submits it which then pulls all the records with that character out of the database. What I would like to add is, as well as selecting a letter they can choose to display the records by thumbnail images. I was hoping to add another radio button for the thumbnail option, but I'm not sure on the php code for taking into account the character selected and whether also the thumbnail option has been checked as well.

If someone could help me out here then that would be great.

Thanks

Simon

Share this post


Link to post
Share on other sites
I'd use a checkbox for the "show pictures" option

[code]<?php

if (isset($_GET['showpics'])) {
     // display pics
}
else {
     // display text
}
?>
<FORM>
<input type="radio" name="letter" value="A">A &nbsp;
<input type="radio" name="letter" value="B">B &nbsp;
<input type="radio" name="letter" value="C">C &nbsp;

<input type="checkbox" name="showpics" value="1"> Show Pictures

<input type="submit" name="submit" value="Submit">
</FORM>[/code]

Share this post


Link to post
Share on other sites

×

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.