Skip to main content
Participant
August 28, 2008
Question

How to make this work in php

  • August 28, 2008
  • 2 replies
  • 239 views
Hello,
I am fairly new to php and am having problems working out the best way to go about doing what i want to do.

I want users of my system to be able to choose from a selection of images which they have earlier uploaded. I am using a system where the picture show is the one with the number 1 in the `use` colum of a mysql database, only i dont know how to make it so a user can change that number.

Any help will be greatly appreicated weather that is how to get the above to work , or ideas of a different system i could use to have the same effect,
thank you,
James
This topic has been closed for replies.

2 replies

james1892Author
Participant
August 31, 2008
thanks done ,cheers
August 30, 2008
From the problem you're describing, I would set it up like this:

Db1_Table 1 (tbl_Images)

Columns
1) id
2) image_location

Db1_Table 2 (tbl_UserPrefs)
1) id
2) user_name
etc...
x) image_location

So, in your user preferences, use a dynamic drop down. The values will come from Db1_Table 1.

When the user submits the changes to his preferences, the value from the dynamic drop down will go into Db1_Table 2.

You'll need to have 2 Recordsets for this to work, of course.

edit: you can also have something else besides a drop down, ex: autocomplete text field or option buttons.