View Full Version : dropdown boxes

04-27-2008, 05:29 AM
Ok guys im coming into a problem. I am making an admin page for my small lil game. On this page i would like for the staff (Admins Only) can goto this page and "drop" the property. I would like to have 2 Drop Down Boxes with a submit button.

Box1= Properties Name
Box2= Properties Location
Submit= Drop Property

Basically, one admin would goto the page. he click Box1 and choose the properties name, then click box2 and choose the location of the property. Then he would click "Drop". Then this would take the "properties owner" and change it to "No Owner"

Is this possible?

04-27-2008, 08:00 AM
I don't understand this. Why would adding a name and location make something else no owner?
Is that a default value?
This would be something you'd do in interpreting the script, or adding it to your database, not something based on immediate input-- that seems like the default.

If you really want, you could always use:
<input type="submit" value="No Owner" name="properties owner">
But that would just be weird.

04-27-2008, 11:59 AM
This is the layout i have pictured in my head:

[properties] [location] [drop]

SO The Admin would choose a business from "properties" then choose a location from "locations" then hit the "drop" button. (like so)

[Slots] [England] [Drop]

That combo of selections from the dropdown boxes would tell the server to:
"goto the slots table, where england is and put "No Owner"

04-27-2008, 09:47 PM
Right. You submit data, the PHP submits a query to MySQL or other database, and it includes default values.
Do you not know how to get the values submitted by the form?
How to run a MySQL query?
How to include default values? (For this, just type in the default as a string in the mysql query, rather than using a variable.)

As far as I can tell this is just standard work with php/mysql, so any intro tutorial on the subjects above should be helpful.