Try something like this:

<script language="javascript">
   function submit_form( type ) {
      document.forms['submit_form'].elements['mode'].value = type;
      document.forms['submit_form'].submit();
   }
</script>

<form name="submit_form" method="....>
<input type="hidden" name="mode" value="">
<input type="submit" .... onClick="javascript:submit_form('foo');">
</form>

[...]
> switch ($_POST['submit'])
> {
> case "edit": ...
> case "new": ...
> }
[...]

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to