Hello
I have designed a simple php form for my website that allows a user to upload a picture in one box, and enter a URL to their profile for a particular site and click submit. When a user submits the two pieces of information, the form then places the picture on my website that links to the profile URL that they entered. However, I have found that several people are adding URLs that are not related to the intended purpose. What I need to figure out is how to change the form to already include the beginning of the URL, and only have the user enter their profile name. For example. if the URL to their profile is http://mywebsite.com/users/userid=kittens, I would want my form to supply the http://mywebsite.com/users/userid= and the user would enter kittens in the box, when they click submit, the URL created would be the full http://mywebsite.com/users/userid=kittens… somehow I cant figure out how to get this to happen. If anyone can be of any help I would Greatly appreciate it. Thank you in advance,
Brian
You could just store their username automatically.
So if they are logged in.
$userid = $_SESSION[‘username’];
or
$userid = $_COOKIE[‘username’];
Then when you display the URL have it echo(’ http://mywebsite.com/users/userid=’.$DatabaseInformation’ ');