So im working on a project and i know that the base programming language is going to have to be PHP. as a coder i can say i know nothing about php. Now your probably gonna tell me to go learn php. but thats not how i learn. Ive been around the coding scene for years now. and if i was given a code i would know how it works. Now the main problem ive had planning this out is the profile part to my project.
I want to make it so users can register, set up a profile and then everyone can go to website.com/usersprofile and view it. kinda like a myspace only much much smaller. I found a login code online (i know it is extremely newb and ill never learn anything " ") and i got it to work. using my own table names changing the names of everything the fields the columns in the SQL database everything. thats how i work. reverse engineering, thats how i learn.
now my only problem is the profile part. i totally understood the login and register. i see how it works and i got it to work. now im not totally sure how i would make it so THAT registered users profile can be displayed.
I need to make it so once someone registers they are automatically thrown into the URL. and from there anyone can view their profile. i can get up the information input places and i know how to display the info they put in. but how they get their own URL extension i do not understand.
It's not entirely clear what you're trying to implement (do you want to know how to serve up a profile given a URL of the form "http://hostname/profilename", or just how to redirect a visitor from one page to another?) and what environment you're trying to implement it in (what's your web server?), but URL rewriting will probably be of interest to you. Note that mod_rewrite is for Apache; if you have some other web server, you'll have to check if someone fixed mod_rewrite to work with it.
As for learning by example, it's a perfectly valid study method. Be aware that relying on it solely can leave your knowledge with gaps and (if you don't also consult reference material) incorrect assumptions.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum