--------------------------------------------------- | Date: 2003-03-16 14:16:59 | | Filename: post.php | | Author: detour@metalshell.com | | | | http://www.metalshell.com/ | --------------------------------------------------- <?php /* post.php by detour@metalshell.com * * Example on posting data to php. * * http://www.metalshell.com/ * */ // If submit button was hit, info_sub will not return null if($_POST["info_sub"]) { // Check to make sure both fields where filled out if($_POST["title"] && $_POST["url"]) { echo('<H3>You Entered: </H3>'); echo('Title: ' . $_POST["title"] . '<br>'); echo('URL: ' . $_POST["url"] . '<br>'); } else { // They left something blank. echo('<H3>Field Missing</H3>'); } } ?> <form method="post"> <table align="center"> <tr> <td>Title: </td> <td><input type="text" name="title" value=""></td> </tr> <tr> <td>URL: </td> <td><input type="text" name="url" value=""></td> </tr> </table> <center><input type="submit" value="Submit URL" name="info_sub"></center> </form>