im trying to get the username of the personal profile.
the url is example.com/theusername/index.php
the "theusername" i want to make into a variable.
How do i do that? i want the variable to be called "theusername"
so how do i make that into a variable? does anyone know?
with php
cause i want to plug each individual variabl in to the rest of the code so its unique and can show the users information of the profile being viewed. i dont know any other way?
does anyone else?
there will be more than one profile obviously.(with different usernames ex. example.com/difusername)
or is there a simpler way to plug in the users information to be written on the page?
SKANK!!!!!
5
Posting Pro in Training
Recommended Answers
Jump to PostActually i didnt get u completely.
Anyway im just trying to help you
you can get username in many ways like using url (GET method), by creating session, cokkies etc or by getting it from database.
I prefer get or session to solve this.If you are little more …
Jump to PostI think what you are looking for is .htaccess files which is part of the apachie rewrite module. With .htaccess files, you can make fake urls that on the server side rewrite to the real file.
Example - real url: site.com/index.php?username=cwarn23&id=blog Fake url: site.com/cwarn23/blog/
I would provide …
Jump to PostHere is sample code for you.
file1.php
======<?php $no=$_REQUEST["no"]; $name=$_REQUEST["name"]; echo "values - $no and $name"; ?> <br/>First Method <form method="post" action="file1.php"> No <input type="text" name="no"/> Name <input type="text" name="name"/> <br/><input type="submit" namd="cmd" value="Submit"/> </form> <br/>Second Method <a href="file1.php?no=100&name=Mr.X">Send</a>
All 10 Replies
danishbacker
0
Junior Poster in Training
cwarn23
387
Occupation: Genius
Team Colleague
Featured Poster
kvprajapati
1,826
Posting Genius
Team Colleague
FlashCreations
20
Posting Whiz
sDJh
39
Posting Whiz in Training
FlashCreations
20
Posting Whiz
SKANK!!!!!
5
Posting Pro in Training
FlashCreations
20
Posting Whiz
SKANK!!!!!
5
Posting Pro in Training
SKANK!!!!!
5
Posting Pro in Training
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.