tags:

views:

68

answers:

3

I'm trying to post a form with php, and I want the form to be handled depending on the value of cmd. Specifying this after the filename does not work..what is the correct way to do this?

echo "<form name=\"statusForm\" action=\"edit_status.php?cmd=submitinfo\" method=\"post\" enctype=\"multipart/form-data\">

Where/how can I specify ?cmd=submitinfo

+2  A: 
echo "<form name=\"statusForm\" action=\"edit_status.php\" method=\"post\" enctype=\"multipart/form-data\"><input type=\"hidden\" name=\"cmd\" value=\"submitinfo\"/>
palako
A: 

I am not sure what you are getting at here. You should be able to get to the query string (the part after the ?cmd=) very easily. You are trying to access it from the edit_status.php file?

Secondly you are using ?_GET["cmd"]

uriDium
+3  A: 

Your form method is POST, and so you could probably just as easily do what you want with a hidden field:

<input type="hidden" name="cmd" value="submitinfo" />

Then just use the $_POST variable, as with your other form parameters, on the edit status page.

James Burgess