0

I have an html drop down with some values like :

This one is inside form :

<b>Priority</b><select><name = "priority" id="priority"><option>Low</option><option>Medium </option><option>High</option></select> 

Now when I click submit, What the value I select should be inserted to db. For that iadded like :

$priority = $_POST['priority'];
$sql3= "INSERT INTO work (priority) VALUES ('$priority')";

But it throw error : unknown identifier.

So how can I get the value from the select and insert into db. Pleasehelp

1 Answer 1

2

Change:

<select><name = "priority" id="priority">

to:

<select name="priority" id="priority">
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.