Skip to main content
October 7, 2013
Question

Make Checboxes In To Array In Dreamweaver (PHP)

  • October 7, 2013
  • 2 replies
  • 992 views

Hi guys, am designing a seat reservation system. i want the check boxes to represent the seats

I want to know how to make each check boxes into array and how to group all the check boxes in a single canvas so that it will store multiple values in one single variable in the database column. there are other texboxes that i want to insert in the same form to get the use booking details.

If am gona store multiple value in one column how do i identify the check box group?

Dreamweaver PHP

<form id="Bookings" name="Bookings" method="post" action="">

  <p>

   

    <input type="checkbox" name="A1[]" value="1" id="A1[]" />

    <input type="checkbox" name="A2[]" value="2" id="A2[]" />

    <input type="checkbox" name="Ab[]" value="3" id="Ab[]" />

    <input type="checkbox" name="A4[]" value="4" id="A4[]" />

     

  </p>

  <p>

    <label for="name"></label>

    <input type="text" name="name" id="name" />

  </p>

  <p>

    <label for="Phone_Number"></label>

    <input type="text" name="Phone_Number" id="Phone_Number" />

  </p>

  <p>

    <label for="E_Mail"></label>

    <input type="text" name="E_Mail" id="E_Mail" />

This topic has been closed for replies.

2 replies

Participating Frequently
October 8, 2013

>If am gona store multiple value in one column

Why on earth would you want to store more than one value in a column? You should never design a database like that.

Known Participant
October 7, 2013

Hi,

I would look for a existing script like this:

http://sourceforge.net/projects/freeseat/

and implement it in your site, because it takes years of experience to develop something like that.

These are only a examples I don't know the scripts, but you can look at Github and do a search:

Example Github:

https://github.com/fnazmul/Cinema_Seats_Booking_System

David