我需要一个短代码功能到我的php联系表单页面(它不是wordpress)[关闭]
问题描述:
i have created a contact page using php. I am sending email to the contact in database.
The database contain Name and email
when i send the email i include the [name] to my email it have to converted to the name of the email receiver.
Can anyone help me to do it
我使用php创建了一个联系页面。 我正在向数据库中的联系人发送电子邮件。 p>
数据库包含姓名和电子邮件 p>
当我发送电子邮件时,我将[姓名]包括在内 我的电子邮件必须转换为电子邮件接收者的名字。 p>
任何人都可以帮助我这样做吗 p> div>
答
Just use string replace.
$new = str_replace('[name]', $row['name'], $emailbody); // search, replace, original