calling php file from form
-
Hi guys,
I am learning php, and I am trying to write a simple form that calls a php file, and can’t get it to work. Can anyone help??? I keep getting a 404 error. I am trying to get the file to call itself and evaluate the php.
Thanks,
Here is the code:
<?php /* Template Name: Amort */ ?> <?php get_header(); ?> <div id="content" class="narrowcolumn"> <h2>Amortization Schedule</h2> <form method=post action="amort.php"> <input type="hidden" name="submitted"> <input type="text" name="testinput"> <input type="submit" name="submit" value="Submit"> </form> <?php if (isset($_POST['submitted'])) { $test = $_POST['testinput']; echo '$test'; } ?> </div> <?php get_sidebar(); ?> <?php get_footer(); ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘calling php file from form’ is closed to new replies.