Browse Source

PHP script path

master
Alexander Yakovlev 5 years ago
parent
commit
c5509e935c
  1. 2
      custom.js
  2. 5
      mortgage.php
  3. 2
      send.php

2
custom.js

@ -232,7 +232,7 @@ jQuery(function($){
return false;
}
window.location.href = buildUrl('./send.php', {
window.location.href = buildUrl(window.mortgage_script, {
'interest': interest,
'price': price,
'tax': tax,

5
mortgage.php

@ -37,4 +37,9 @@ function calculator_scripts()
wp_register_script( 'mortgage-script', plugin_dir_url( __FILE__ ) . '/custom.js', array('jquery'), '1.1.0', true );
wp_enqueue_script( 'mortgage-script' );
wp_add_inline_script(
'mortgage-script',
'window.mortgage_script = "'.plugin_dir_url( __FILE__ ).'/send.php";',
'before'
);
}

2
send.php

@ -17,6 +17,6 @@ $message .= "\r\nPhone: ".$_GET['phone'];
$message = wordwrap($message, 70, "\r\n");
mail(bloginfo('admin_email'), 'Mortgage Calculator', $message);
mail(get_bloginfo('admin_email'), 'Mortgage Calculator', $message);
echo "Thank you for your interest in getting a mortgage through Stewardship! We have your information and will be in contact with you soon.";

Loading…
Cancel
Save