Php 插入数据库nusoap complexType
我想从以下位置创建插入数据库web服务: 这是我的剧本:Php 插入数据库nusoap complexType,php,html,output,nusoap,Php,Html,Output,Nusoap,我想从以下位置创建插入数据库web服务: 这是我的剧本: 尽管增加了ID,为什么其他列仍然为空? 请帮帮我,谢谢 代码 <form action="Contact.class.php" method="POST" > Nama Depan:Nama Belakang:电子邮件:电话电报: 如您所见,方法是GET,将其更改为POST 像这样 <form action="Contact.class.php" method="POST" > Nama Depan:&
尽管增加了ID,为什么其他列仍然为空?
请帮帮我,谢谢
代码
<form action="Contact.class.php" method="POST" >
如您所见,方法是GET
,将其更改为POST
像这样
<form action="Contact.class.php" method="POST" >
Nama Depan:<br> <input type="text" name="first_name"/><br>
Nama Belakang:<br> <input type="text" name="last_name"/><br>
Email:<br> <input type="text" name="email"/><br>
Telepon:<br> <input type="text" name="phone_number"/><br><br>
<input type="submit" value="Submit"/><br> </form>
固定的
代码。。你有很多凹痕出了问题。。
纳马·德潘:
娜玛·贝拉康:
电子邮件:
电话亭:
尝试添加var\u转储($\u POST)
在空输入之后,错误是否存在于我创建的数组中?可能
没有正确地将数据发送到PHP。你能显示
代码吗?对不起,没有成功。Nama Depan:
Nama Belakang:
电子邮件:
电话电报:
你还不能解释你的答案吗?您做了什么以及为什么它工作?$result=$client->call('method',array('param1,param2');抱歉,我没有完成就单击了enter。可以看到,我们将首先调用已注册的方法,然后调用数组。但是,数组已经指定,因此只调用$in_contact作为($in_contact=array($first_name'=>$POST['first_name'],'last_name'=>$POST['last_name'],'email'=>$POST['email'],'phone_number'=>$POST['phone_number'],)欢迎使用堆栈溢出!请将您的帖子添加到您的答案中。避免在评论中添加这些内容,因为它们更难阅读,也更容易删除。标记者/审阅者:
<form action="Contact.class.php" method="POST" >
<form action="Contact.class.php" method="POST" >
Nama Depan:<br> <input type="text" name="first_name"/><br>
Nama Belakang:<br> <input type="text" name="last_name"/><br>
Email:<br> <input type="text" name="email"/><br>
Telepon:<br> <input type="text" name="phone_number"/><br><br>
<input type="submit" value="Submit"/><br> </form>
<?php
require_once 'lib/nusoap.php';
$client= new nusoap_client("http://127.0.0.1/test2/index.php", false);
$in_contact=array ('first_name'=>$_POST['first_name'],
'last_name' => $_POST['last_name'],
'email' => $_POST['email'],
'phone_number' => $_POST['phone_number'],);
$result = $client->call('insertContact', array($in_contact));
if ($result){
echo "OK";
} else {
echo "Error";
}
?>