Author | Post | |||
sniperkid |
this is sort of what i wanted.. <input type="text" name="note"> <input type="submit" value="Add-Notes" name="notes"> then in php it would get what the value of "note" is and write it to a file, the problem is how do i store the value of "note" as a var??? |
|||
06.08.2004 13:40:10 |
|
|||
Erik |
Hi, first of all you should give different names to the elements of the form. So in your example the submit and text-elements shouldn't have the same name. Now usually you simply create a form containing the elements: <form action="php_script_to_be_called.php" method="POST"> Text: <input type="text" name="note" value="" /><br /> <input type="submit" name="button_send" value="Submit!" /> </form>In the script you have super-global variables $_GET and $_POST. So you find the data in them, corresponding to which method you specified in the form. In the example, you could access the note in the script with $_POST['note']. Cu, Erik |
|||
06.08.2004 15:13:58 |
|