mallard Posted April 19, 2007 Share Posted April 19, 2007 I wanna make a simple form on my site that will submit content on a page. I added this piece of code to my notes.php file... <?php echo $_GET["date"]; ?><br /> <?php echo $_GET["note"]; ?> And I created a new file called post.php with this code in it... <p>Use this form to post new notes.</p> <form action="get" target="notes.php"> Date: <input type="text" name="date"><br /> Note: <input type="text" name="note"><br /> <input type="submit" value="SUBMIT ENTRY"> </form> I can't figure out how to make it work. Basically I just wanted to make this "post" page with a form post content on the "notes" page. Am I missing something? Thanks for any help! Link to comment https://forums.phpfreaks.com/topic/47695-help-making-a-simple-form/ Share on other sites More sharing options...
Fehnris Posted April 19, 2007 Share Posted April 19, 2007 You got your html form attributes abit mixed up. you have action="get" and target="notes.php" it should be method="get" and action="notes.php". Link to comment https://forums.phpfreaks.com/topic/47695-help-making-a-simple-form/#findComment-232928 Share on other sites More sharing options...
shaymol Posted April 19, 2007 Share Posted April 19, 2007 Hi mates You are trying to submit the contents of a form to another php file. you can try with the following code in your post.php <form action="notes.php" method="get"> Thanks Shaymol Link to comment https://forums.phpfreaks.com/topic/47695-help-making-a-simple-form/#findComment-232932 Share on other sites More sharing options...
mallard Posted April 19, 2007 Author Share Posted April 19, 2007 Thanks guys. Link to comment https://forums.phpfreaks.com/topic/47695-help-making-a-simple-form/#findComment-232959 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.