Plugin,PHP & how to send data by $_POST

hostfast

Verified User
Joined
Jul 28, 2008
Messages
50
Hello,

In the script that sends the data is example:
PHP:
print('<form name="a" id="a" method="post" action="/CMD_PLUGINS/newplugin">' .
       '<input type="text" name="n1" id="n1">' .
       '<br><br><br><a href="/CMD_PLUGINS/newplugin/?cmd=command>Send</a>');

In the script, that receive the data is:
PHP:
if ( isset($_SERVER['POST']) && ($_SERVER['POST']) )
{
parse_str($_SERVER['POST'], $_POST);
}

and $_POST is empty :(
How to write the code correctly ?

Regards
 
Hello,

PHP:
<?php
print "<pre>";
var_dump($_SERVER);
print "</pre>";
?>


And you'll probably see how to get what you need...
 
You're missing a submit button in your form? The link won't do anything with the input value :)
 
Back
Top