Skip to Content Skip to Menu

🎃 Happy Halloween! Treat yourself with an awesome discount on memberships! Get 20% off now with code SPOOKY-2024!

How can PHP-script know on which profile it is?

  • NicoFaaij
  • NicoFaaij
  • OFFLINE
  • Posts: 114
  • Thanks: 10
  • Karma: 1
13 years 9 months ago #150866 by NicoFaaij
Hi,

I want to execute some php on a user profile page. It does a sql depending on the username of the profile page owner.

How can php determine to wich userid the profile page belong?

Many thanks in advance,
Nico

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48459
  • Thanks: 8280
  • Karma: 1443
13 years 9 months ago #150919 by krileon
You could use Professional subscriber CB Code which allows performing GET, POST, etc.. requests on various URLs (even PHP files) at various CB triggers such as after profile display. This would allow you to execute a PHP file to perform whatever code you feel necessary after profile view. You could also develop a new CB plugin utilizing CB triggers to do as you're wanting. More on CB triggers can be found at the following location.

www.allmysocials.com/tutorials/item/228-event-triggers


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • NicoFaaij
  • NicoFaaij
  • OFFLINE
  • Posts: 114
  • Thanks: 10
  • Karma: 1
13 years 9 months ago #150960 by NicoFaaij
Many thanks! I think you have given me gold with the CB triggers but I am still on a to low skill level. I have tried it for many hours but couldn't get it work. So I will keep it in my treasure box for later.

For now just $user = $_GET["user"]; solved my problem.

Shame on my (and my sh404SEF component) that I didn't think in this direction earlier.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum