PHP script not executing after form submit
-
Here is a link to the page in question: https://www.bigapplebuddy.com/quick-quote/
This is my form:
<form id="quick-quote" class="" action="" method="post"> <label>Country</label> <br> <input id="country" type="text" name="country" value=""> <br> <label>Postal Code</label> <br> <input id="postal" type="text" name="postal" value=""> <br> <br> <input id="submit" type="submit" name="" value="submit"> </form> <br>
This is my php script directly under the form (same file):
<?php print_r($_POST); error_reporting(E_ALL); session_start(); require_once('../../library/fedex-common.php'); //a bunch of functions that use the form data go here ?>
I then include the above file in a template file so I can call it on specific pages:
<?php /* Template Name: quick-quote */ ?> <?php get_header(); include('RateService_v20_php/RateAvailableServicesService_v20_php/php/RateWebServiceClient/RateAvailableServices/RateAvailableServicesWebServiceClient.php'); get_footer(); ?>
The issue that I have having is this:
-I fill out the form
-hit submit
-print_r($_POST) the data to see if form posted correctly (it does)
-any code after require_once(‘../../library/fedex-common.php’); does not executeThings I have already checked/tried:
-PHP and SOAP are installed correctly on the server
-all files are excessible 664 not 666
-ran the file on the server, it works fine
-setting the form’s action to “rate.php” or “quick-quote.php” (form posts data to same page so I think this can be left blank)
-made sure (‘../../library/fedex-common.php’) is the correct pathSo my questions are:
-How do I make the php script execute after the form is submitted?
-Is this accomplished using functions.php to hook into admin-post.php?
- The topic ‘PHP script not executing after form submit’ is closed to new replies.