Subscribe To Our Newsletter

Sign Up Now To Get SEO and Programming Tips

We Hate Spam! Really, It's terrible and we never do it.

How to retrieve user data from URL?

How to retrieve user data from URL?

like you click on a username and url is
domain.com/?user=samee
now you can get data from it

like query will be
select * from users where user = samee limit 1
It will by query

now how to start

in header before <html> you need to write code

 $username = $_GET['user']; //now you have username variable  
 $query = "select * from users where user = $username limit 1";  
 $query_run = mysqli_query($con, $query);  
 $user = mysqli_fetch_array($query_run);  
 //here you will get complete user data and now you need to put on page  
 <html>  
  <head>  
  </head>  
 <body>  
  <p>Name = <?php echo $user[name]; ?></p>  
  <p>age = <?php echo $user[age]; ?></p>  
  <p>Address = <?php echo $user[address]; ?></p>  
  </body>  
 </html>  

Share this article :

Post a Comment

Give your reviews about this blog. Leave your comments. what do you think about this post?

Comments Description is given below:
1) I love to read comments, but do not spam.
2) Like this blog and also tweet its posts.
3) You can use some xHTML tags.
4) All Comments are Do Follow, Please try to use blog professionally.
5) Mention Your Name below the comment.
6) You can also suggest for improvement.
7) Do not forget to subscribe FusionMarketPro.online blog.

---------------------------------------
Thanks for visiting FusionMarketPro.Online.
==========================================
Join Sami Jeweller and Shop online jewelry for your someone special.
==========================================
Best Regards

 
Copyright © 2013-2016. Samee Articles - All Rights Reserved
Proudly powered by Blogger