I want to add a new form input field using a smart

2019-09-11 03:09发布

I have a third party script and in this script I want to add a new input field in the User profile update -page. I want to save the bank field where user can save their bank names. I have already created a bank column in the database table members.

The script does not save the bank name to the database.

<form id="settingsform" onsubmit="return submitform(this.id);">
<input type="hidden" name="a" value="submit" />
<td align="right" width="50%">Bank Name:</td>
<td><input type="text" name="bank" id="bank" value="{$user_info.bank}"></td>

This is the code that I have for the form.

All settings are shown on the .tpl (Smarty) -file. Could you please help me out?

1条回答
别忘想泡老子
2楼-- · 2019-09-11 03:24

Try adding the line

$bank = $input->pc['bank'];

to the code here

if ($_POST['a'] == "submit") {
        verifyajax();
        $email = $input->pc['email'];
        $bank = $input->pc['bank'];

I think You have not retrieved the bank field on the php file.

you need to get the posted bank value as you have retrieved the other fields

查看更多
登录 后发表回答