
Originally Posted by
LingoOutsider
Thanks for your help and sorry for the vague question.
your corret in that my buttons are in conflict. and my samples form should have been set to get although it could work with post.
1st... A button appears in the URL as being submited when pressed.
Then... The text from the textarea appears in the URL as well as the previously pressed button when the enter button is pressed inside the textarea.
so if I use $_GET and I think $_POST it shows as submited even though It hasn't.
Having two submit buttons does not mean that they are in conflict; as long as you realise that only one button can be used to submit the form in any one request and you require your application to behave differently depending on which button is pressed, it is fine. The Google search enginge has two submit buttons "Search" and "I'm Feeling Lucky".
When testing, it is best to use the Isset() construct rather than simply testing weather or not it is "true". The fact you are doing that also indicates that you have error_reporting set to something other than "E_ALL". During the development of your script or application, it is essential that you set error reporting to its maximum level. You can do this by changing php.ini:
Code:
error_reporting = E_ALL
Or set it at the top of the script:
PHP Code:
error_reporting(E_ALL);
Doing this will help with the debugging process because it will spit out a notice every time you try and read a variable that was never set. A great way of filtering out typos and encouraging secure coding by ensuring that any variable you intend to use is explicitly set first in the code:
PHP Code:
$myvar = "";
$mayvar += "Hello"