Jump to content


Sql help

  • Please log in to reply
1 reply to this topic

#1 simon157

  • Members
  • Pip
  • Newbie
  • 8 posts

Posted 21 May 2006 - 07:09 AM

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.



#2 Barand

  • Moderators
  • Sen . ( ile || sei )
  • 18,021 posts

Posted 22 May 2006 - 07:19 AM

I'd use a checkbox for the "show pictures" option


if (isset($_GET['showpics'])) {
     // display pics
else {
     // display text
<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">

If you are still using mysql_ functions, STOP! Use mysqli_ or PDO. The longer you leave it the more you will have to rewrite.

Donations gratefully received


|baaGrid| easy data tables - and more
|baaChart| easy line, column and pie charts

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users