This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
2. How do you identify the name of the parameter? Does your <select> tag has a 'name' attribute or your Javsascript does it?
Server side: 3. Did you try reading the selected value via $_POST?
4. If you did the step 3, did you try using if conditions or switch conditions to check the selected value?
5. If you did all these steps, what all you need is to set a header "Location" header to the redirect path as in header('Location: php1.php');
About the question, are you sure that you have used quotes to denote all String literals as in 'Ajeet' and you still get this notice? You get that notice when quotes are not used.
Another thing I noticed is you omitted the 'value' attribute from your <option> tags, so no value will be assigned to your 'hero' parameter (this is where isset is usefil). I can't however understand how you get an undefined constant warning even with that.
Mahtab Alam wrote:How to get the selected value and make a query to insert in the table in database.
Did you manage to obtain the parameter value anyway? If not, show us your code. We can discuss it over here as that's what this topic is all about. If your question is about setting up database connections, or persisting data over a connection, please start a new topic in this form. When you do that, please IsolateTheProblem - you got the param value already, so the question should probably be only on persisting a value to the database.