我有一个简单的用户名和密码表单,我如何将通过用户输入的值传递到我的php数组中?
我的数组
$post_data = array(
'username' => 'user',
'password' => 'pass#',
);形式与数组
Username
Password
Login
session_start();
$service_url = 'http://localhost/app/sapi/user/login.xml'; // .xml asks for xml data in response
$post_data = array(
'username' => 'user',
'password' => 'pass#',
);
$post_data = http_build_query( $post_data, '', '&' ); // Format post data as application/x-www-form-urlencoded