Jump to content

Help with checkboxes


Rab0099

Recommended Posts

I am using php to display information from a MySQL database. It starts with three radio buttons and upon selecting one it will display some information for all items in that category. I have all this working but I need to add check boxes for each item and when submitted it will display all information for those items. Below is the bit where I need to insert check box and I'm also attaching my php (leaving out html form and database as it shouldn't be required to help). I must do this as soon as possible, please help. Thanks..

 

           while ($row = mysql_fetch_assoc ($result_set))
           {

              $ID =  $row['id'];
              $auth =  $row['entertainerauthor'];
              $title =  $row['title'];
              $media =  $row['media'];
              $feature =  $row['feature'];

              printf  ("\nID: %s",$ID);
              printf  ("\nEntertainer/Author: %s",$auth);
              printf  ("\nTitle: %s",$title);
              printf  ("\nMedia: %s",$media);
              printf  ("\nFeature: %s",$feature);
              print "\n";

              }

 

[attachment deleted by admin]

Link to comment
Share on other sites

<html>

 

<body>

 

<form action="whatever.phphphph" method="post">

<input type="checkbox" name="check" value="whatever">Whatever</input>

<button>Submit</button>

</form>

<?php

 

$checkbox = $_POST['check'];

 

echo $checkbox;

 

?>

</body>

 

</html>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.