I was wondering if someone could tell me how I can set a default image to auto increment, when one of my members sign up. I cant figure out how to set this in phpmyadmin. I could do it manually, but I'd rather it be automatically.
JayGeePee
Recommended Answers
Jump to PostI dont quite know what you mean with "auto-increment", do you mean the filename (e.g. the first user has unknown1.jpg and the second unknown2.jpg????)? Anyway, you can set a default value for a column by using DEFAULT in sql:
ALTER TABLE users ADD image DEFAULT 'unknown.jpg'
or,
…
Jump to PostFIRST
If you've used method 2, I assume you want to add the default image to existing members who don't have an image:UPDATE users SET image = 'default.jpg' WHERE image = ''
SECOND
You need to supply more info on what you mean.THIRD
Jump to PostI'm not really following this very well at all. Are you getting problems viewing the images in a particular page?
smartness is talking about .htaccess files NOT php. As far as I can tell, this should sort your problem w.r.t getting member info on a member page, where the …
Jump to PostI don't see the point. htaccess will enable you to enter the url you want and the $_GET variable in the index.php page will then give you a hook to the db to extract the user's details. That's it. Cookies shouldn't really feature here. The htaccess method will work whether …
Jump to PostI have tried it, but it dont seem to do anything... None of my member urls exist on my server... They all reside on my database.
Obviously.
Use this with the htaccess file in place:
index.php - I wouldn't use this on the index.php, I'd change it to …
All 24 Replies
Graphix
68
---
JayGeePee
diafol
JayGeePee
smartness
-3
Junior Poster
JayGeePee
diafol
JayGeePee
mayz
0
Newbie Poster
JayGeePee
diafol
JayGeePee
JayGeePee
diafol
JayGeePee
diafol
JayGeePee
diafol
JayGeePee
diafol
somedude3488
commented:
eaten....nice.
+6
JayGeePee
diafol
JayGeePee
commented:
Great Persistence...Master Coder!
+1
JayGeePee
diafol
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.