Support » Fixing WordPress » How to add PHP Calculation to Page

  • I am trying to add a page to my wordpress site that allows users to add in price and shipping options and then calculate the total cost. It works fine on the server outside of wordpress but when I add it to wordpress, I get a 404 error. What am I missing here? I’ve added PHP Execution but still it doesn’t work. Here is the code I’m using

    <!– Script 4.1 – calculator.html –>
    <div><p>Fill out this form to calculate the total cost:</p>

    <form action=”handle_calc.php” method=”post”>

    <p>Price: <input type=”text” name=”price” size=”5″ /></p>

    <p>Quantity: <input type=”text” name=”quantity” size=”5″ /></p>

    <p>Discount: <input type=”text” name=”discount” size=”5″ /></p>

    <p>Tax: <input type=”text” name=”tax” size=”3″ /> (%)</p>

    <p>Shipping method: <select name=”shipping”>
    <option value=”5.00″>Slow and steady</option>
    <option value=”8.95″>Put a move on it.</option>
    <option value=”19.36″>I need it yesterday!</option>

    <p>Number of payments to make: <input type=”text” name=”payments” size=”3″ /></p>

    <input type=”submit” name=”submit” value=”Calculate!” />



Viewing 2 replies - 1 through 2 (of 2 total)
  • I too am looking for this same information. I am contemplating using a plugin like exec-PHP but would rather avoid using a plugin unless it’s really the best way (for people of my limited expertise).

    I’m also looking for something very similiar, did you guys end up finding anything out?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to add PHP Calculation to Page’ is closed to new replies.