Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

How to make this work in php

Explorer ,
Aug 28, 2008 Aug 28, 2008

Copy link to clipboard

Copied

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
TOPICS
Server side applications

Views

225
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 29, 2008 Aug 29, 2008

Copy link to clipboard

Copied

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.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Aug 31, 2008 Aug 31, 2008

Copy link to clipboard

Copied

LATEST
thanks done ,cheers

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines