• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

QUESTION How to Pass variables between Snippets

Messages
5
Likes
0
Points
1
#1
Hello,
I have a Snippet that is a form that uses $_SESSION variables. I want to pass a variable from one Snippet to another Snippet, so I can run Mysql database queries.

Example:

[wbcr_snippet id="6677"] has a variable that is the "mysqli_insert_id($link);" I want to pass this variable to [wbcr_snippet id="5597"] to run a mysql query using the variable in the WHERE id = the value of "mysqli_insert_id($link);".

Is this possible?
 

Kirill

Support team
Messages
82
Likes
4
Points
8
#2
Hi

Sorry, the plugin does not have the feature to share variables between snippets.

As a workaround, I can suggest using global variables, a session, or something like that.
This is not a perfect solution, but it works.

Best regards, Kirill
Webcraftic team