Search
Left Quote    Copy from one, it's plagiarism; copy from two, it's research.
- Wilson Mizner    
Right Quote
 
[login] | [Register]
Forum Index » PHP and mySQL » Viewing Topic and Replies
Post Reply


        Viewing Topic: Picture Upload Categories
  This user is offline  BoricuaLayz
  Subject: "Picture Upload Categories" Posted: @ 1:22 am on Jul 03 2007   
Member #: 356
Rank: User - (30)
Since: 06/25/07
Posts: 44
From: Florida

In my Member Area i am going to have it possible for the user to upload his ro her own graphics, avatars/icons, signs, ect...
in the mySQL table can i make a different column for each categorie (avatars, signs, etc...) and in the upload script have the user choose which categorie he or she wants his or her content uploaded to. I think this is a really good idea for myspace and web resource sites. I have a script for when a item is uploaded and displayed on a webpage it shows a rating where other members can rate that item.


    Viewed: 7,731 Times | Reply to This | To top
  This user is offline  bs0d
  Subject: "re: Picture Upload Categories" Posted: @ 2:38 am on Jul 03 2007    

Member #: 1
Rank: Admin. - (1,505)
Since: 02/06/05
Posts: 600
From: USA

Yea, you should be able to do that no problem im pretty sure.




-bs0d | AllSyntax.com

    Viewed: 7,725 Times | Reply to This | To top
  This user is offline  BoricuaLayz
  Subject: "re: Picture Upload Categories" Posted: @ 3:24 am on Jul 03 2007    
Member #: 356
Rank: User - (30)
Since: 06/25/07
Posts: 44
From: Florida

How would i change the upload form to have a drop down box where the user changes the category and the item gets sent into that column




    Viewed: 7,719 Times | Reply to This | To top
  This user is offline  sm0ke
  Subject: "re: Picture Upload Categories" Posted: @ 10:04 am on Jul 03 2007    

Member #: 168
Rank: User - (83)
Since: 06/05/06
Posts: 34
From: Manchester - UK

well, put the cats you want into a select box, give the select box a name like cats so:


Code:


<select name="cat s">Ple ase Select Cat
<option value="ca t1">Av atar
<option value="ca t2">Si gn
</select>



then once the form is submitted, you need to set the value of cats to reflect the cat you want it in. so something like:


Code:

$catin = "$_POST[ 'cats']" ;



then use $catin for the database query where inserting the image type.


Code:

$query = "INSERT INTO table(id, $catin) VALUES('0', '$image',)&q uot;;



so in this case if the user chose Avatar, the query would insert the image into the avatar field and so on.

I've not tested this, its just the logic i would use to accomplish it.




Just because I dont care, doesnt mean I dont understand.

purepcs@hotmail
.co.uk |     Viewed: 7,705 Times | Reply to This | To top
Viewing Page: 1 of 1


1 |

You must be logged in to post on the forums. Login or Register








"AllSyntax.com" Copyright © 2002-2018; All rights lefted, all lefts righted.
Privacy Policy  |  Internet Rank