I want to insert data through my web application. I have dropdown box (have 2 values Yes and No)and when i select yes insert record will be 5 and when i select no insert record will be 3. So i cant insert data using same query in php. How can i insert data depend on user selected value?
From the amount of information you gave? You'll only need an if Statement.
[PHP]
// assuming you have that YES NO value in a variable called $dropDownBoxValue then...
if (strtoupper($dropDownBoxValue) == 'YES')
{
//insert 5 records
}
if (strtoupper($dropDownBoxValue) == 'NO')
{
//insert 3 records
}
This is not a joke! Give more info = get better answer.
[/PHP]