Trying to POST a variable to a PHP script with CB Auto actions.
For now the script only echo's back the received POST variable.
I can see that the script is called and returns the "OK".
The problem is that the script does not seem to receive any POST variable I put in Auto actions Headers.
Auto action header:
Trigger: Manual 'Click to Execute'
Conditions: none
Action:
Methode = POST
URL = url to script
Header Key= cb_id
Header Value= [user_id] (or anything I put here)
Script:
<?php
echo "OK, $_POST["cb_id"]";
?>
also tried echo "OK,$_POST[0]";
I would expect to see the user_id being echo'd or anything I put in the Header value, but only get OK, back.
It's sending an HTTP POST request using CURL to your script. The URL to your script needs to be a live path beginning with domain. You're also sending the POST data as a Header of the CURL request. You need to send it as part of the Body.
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.