php - $_POST is empty on XAMPP when post from remote form -


i have windows vps server, server personal server installed xampp running php , apache on server.

now created post method on server , post data persoanl server (which have xampp).

when use $_post variable empty, checked $_request variable empty too.

local forms don't have problem , $_post pass posted variables, have problem in remote forms.

i think problem related security , should change on php.ini, don't know should do!

update:

html code:

<form method="post" action="http://xxx.xxx.xxx.xxx/login.php">   <input type="text" name="username" value="username ..." />   <br/>   <input type="password" name="password" value="password ..." />   <br/>   <br/>   <input type="submit" name="submit" value="send" /> </form> 

php code :

<?php  echo $_post['username']; echo $_post['password']; print_r($_post); print_r($_request); print_r($globals);  ?> 

if both file located on same server php file work , $_post return posted variables, if html file located on different server, $_post empty !

this wild guess. maybe forgot set method in form.

<form method="post" action="http://somepage.com/"> 

and make sure post array in receiving end not empty, need input fields defined name.

<input type="text" name="my_value" value="test value" /> 

on receiving server print_r($_post) should create like:

array (     [my_value] => test value ) 

Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -