There are some helpful questions on StackOverflow (links below), it’s a good start but not enough I think.
https://stackoverflow.com/questions/48481689/call-wordpress-plugin-variable-in-theme-file
I want to increment myCred User’s Points balance value with the value of my custom variable! Let me explain this a bit more:
Using jQuery post()
method I’m able to Submit data (for example a numeric javascript variable ) to be processed to a specified PHP file in the server. let’s have a look at my code to understand what I want to do with it :
Here is my JavaScript code:
var speechResult= 10;
$.ajax({
url:"https://...Example.php",
method: "post",
data: {'speechResult': speechResult},
success: function(res) {
console.log(res)
}
});
And here is the code in my Example.php, it just show speechResult value in the console (The value that comes from my javascript code!):
<?php
print($_POST['speechResult'])
?>
as you can see I have a JavaScript variable named “speechResult“, and I have a PHP file named “Example.php” .By using the code above I can pass speechResult value to Example.php or any other PHP file on the server (like any PHP files of myCred plugin)
I want to increment myCred User’s Points balance by the value of “speechResult” variable (I want to increment myCred variable using my own external javascript variable).
I know there should be a way to achieve this but, unfortunately, I’m a newbie to PHP and I really need your kind assistance here.
Any Any Any suggestions or ideas are extremely appreciated…
Using jQuery post()
method I’m able to Submit data (for example a numeric javascript variable ) to be processed to a specified PHP file in the server. let’s have a look at my code to understand what I want to do with it :
Here is my JavaScript code:
var speechResult= 10;
$.ajax({
url:"https://...Example.php",
method: "post",
data: {'speechResult': speechResult},
success: function(res) {
console.log(res)
}
});
And here is the code in my Example.php.it just show speechResult value in the console (The value that comes from my javascript code!):
<?php
print($_POST['speechResult'])
?>
as you can see I have a JavaScript variable named “speechResult“, and I have a PHP file named “Example.php” .By using the code above I can pass speechResult value to Example.php or any other PHP file on the server (like any PHP files of BadgeOS plugin)
I want to increment BadgeOS User’s Points by the value of “speechResult” variable (I want to increment BadgeOS variable using my own external javascript variable).
I know there should be a way to achieve this but, unfortunately, I’m a newbie to PHP and I really need your kind assistance here.
Any Any Any suggestions or ideas are extremely appreciated…
Here’s what I’m trying to do:
Form 24 captures name and email. redirects to a thank you page. Field “name” shows on redirected page. Confirmation email sends, which includes name from form 24.
Here’s what I’m trying to do: I want to include a referral url in this email (Tell your friends!) This url sends them to another separate page, with form 27 on it.
I would like to be able to include the “name” field” from form 24 into the imbedded url to pass to form 27. example: www.website url/?27referred=24referred
On Form 24 I have enabled posted data to be sent. Renaming fields:
First-Name=24name
from_email=24email
Referred-by=24referred
On Form 27 I have enabled posted data to be sent. Renaming fields:
First-Name=24name
from_email=24email
Referred-by=24referred
I want the “Referred-by” field on form 27 to pick up the passed variable from Form 24.
When form 27 is filled out, it redirects back to the same page as form 24 redirects to.
I value input from anyone here. Mike, this doesn’t have to be a long researched support issue. Just something I’d like to try to work if it is possible.
]]>Currently what I have in my popup maker script is this:
[contact-form-7 id=”25613″ title=”Pop up contact form”]
It access contact form 7, but I want it to pass a variable to the contact form depending on popup URL/page name.
https://www.ads-software.com/plugins/popup-maker/
]]>First SQL:
Select date, month from schedule where …
A FORM that other data is entered in
Second SQL, needs to use the month from the first SQL and the data from the form to build an INSERT statement to update the database.
I can do everything, issue the form, collect the data, build the insert statement and update the database. What I can not figure out is how to pass the month from the first SQL to the second. I suspect it has to do with bouncing back and forth between PHP and HTML but I hope there is a way.
Thanks for your help.
Rick
]]>For example, if have a page named ‘DVD Deals’ (dvd-deals), and the affiliate link on the page is dvds.com/affiliates&tracking=blank. I want to be able to change the tracking portion of the affiliate link to some variable like {pagetitle}, so when the affiliate link dvds.com/affiliates&tracking={pagetitle} is placed on the ‘DVD Deals’ page it becomes dvds.com/affiliates&tracking=dvd-deals
I’ve been messing with this for a while, so any help would be greatly appreciated.
]]>I’ve got a ‘rent product’ link by each product shown on a page.
The link passes a php variable, e.g:
https://www.webdesignbart.be/?urlProduct=https://www.webdesignbart.be/joca/wp-content/uploads/2015/03/summer-winter-256701.jpg
I want to get the image URL in the form, and in the e-mail posted to the admin and user.
In php I would use this:
<?php
if (isset($_GET['urlProduct'])) {
echo $_GET['urlProduct'];
}else{
// Fallback behaviour goes here
}
But I can’t use php in the form.
I’ve been looking for hours for this to work, so …
Can anyone help me out? I would be very greatfull!
Kind regards,
Bart
https://www.ads-software.com/plugins/ninja-forms/
]]>Is there any way I could pass the OpenID identity server endpoint URL by a variable in the URL.
For instance for the openid identity server https://joe.myopenid.com I would like to do something like mysite.com/wp-login.php?openid=https://joe.myopenid.com?
Thanks in advance for any help
https://www.ads-software.com/extend/plugins/openid/
]]>I need to pass a url variable to my category.php file. Currently my category page is at https://www.ads-software.com/category-slug/ I am using the SEO plugin to rewrite https://www.ads-software.com/category/category-slug and remove the /category/ part. Also, the settings formy permalinks are set to this option in the settings menu: ‘https://www.ads-software.com/sample-post/’
Now I need to be able to pass a variable in the URL like:
https://www.ads-software.com/category-slug/?type=VALUE or https://www.ads-software.com/category-slug/VALUE
where “type” is the name of the variable and VALUE is its value
I have tried using this piece of code in my functions.php file:
<?php
add_filter('query_vars', 'parameter_queryvars' );
function parameter_queryvars( $qvars )
{
$qvars[] = 'type';
return $qvars;
}
global $wp_query;
if (isset($wp_query->query_vars['type']))
{
print $wp_query->query_vars['type'];
}
?>
However, when I try to open https://www.ads-software.com/category-slug/?type=something or https://www.ads-software.com/category-slug/something I get “nothing found” and “Page not found” pages.
How do I properly pass a variable to a category page?
]]>