Answered
Checkboxes for web application
Hi.
I'm Using:: Dreamweaver8 - PHP5.1.6 - MySQL5 - Apache2.2.3
I'm also New to these softwares.
Hope you'll guide me to it.
-------------------------------------------------------------------------------------------
Rough Image:
Several Checkboxes (E.g. Electrical, Mechanical, Chemical...)
Function - Add or Edit
Naming -
E.g. Electrical -- Name: JobCategory | Checked Value: Electrical
Mechanical -- Name: JobCategory | Checked Value: Mechanical
Situation/Need --
When the user checks both 'Electrical' and 'Mechanical', the database should contain something like "Electrical, Mechanical" or "Electrical & Mechanical" or...
Column Name in Database: JobCategory
-------------------------------------------------------------------------------------------
My code now only allows me to have one value in the 'JobCategory' column although it uses checkboxes.
The code was something like:
$insertSQL = sprintf("INSERT INTO candidate (..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., JobCategory, ..., ..., ..., ..., ..., ..., ..., ..., ...) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
.
.
.
GetSQLValueString($_POST[JobCategory], "text"), //JobCategory is the Name of all the checkboxes
.
.
.
Thanks babe and dudes~
My appreciation
__SY__
I'm Using:: Dreamweaver8 - PHP5.1.6 - MySQL5 - Apache2.2.3
I'm also New to these softwares.
Hope you'll guide me to it.
-------------------------------------------------------------------------------------------
Rough Image:
Several Checkboxes (E.g. Electrical, Mechanical, Chemical...)
Function - Add or Edit
Naming -
E.g. Electrical -- Name: JobCategory | Checked Value: Electrical
Mechanical -- Name: JobCategory | Checked Value: Mechanical
Situation/Need --
When the user checks both 'Electrical' and 'Mechanical', the database should contain something like "Electrical, Mechanical" or "Electrical & Mechanical" or...
Column Name in Database: JobCategory
-------------------------------------------------------------------------------------------
My code now only allows me to have one value in the 'JobCategory' column although it uses checkboxes.
The code was something like:
$insertSQL = sprintf("INSERT INTO candidate (..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., JobCategory, ..., ..., ..., ..., ..., ..., ..., ..., ...) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
.
.
.
GetSQLValueString($_POST[JobCategory], "text"), //JobCategory is the Name of all the checkboxes
.
.
.
Thanks babe and dudes~
My appreciation
__SY__
