在邮寄邮件之前确认消息 [英] confirming message before mailing in php

查看:128
本文介绍了在邮寄邮件之前确认消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个网站,其中将列出数据库中的名称作为链接。我已经知道,当一个用户点击名字时,它会将名称的详细信息传递给另一个页面,以查看电子邮件格式等。我只需要一个建议,我可以做到这一点,因为我不是专家与php尚未我还在研究更先进的代码。因此,

I'm developing a website where in it will list names from database as links. I'm already up to the point that when one user clicks on the name, it will pass the name's details to another page to view the email format etc. I just need a suggestion on how I can do this as I'm not an expert with php yet. I'm still studying more advanced codes. So,


  1. 点击名称,

  2. 将详细信息视为电子邮件和确认按钮,

  3. 发送邮件。我只需要关于如何使这个简单的建议。我正在了解mail()的脚本。感谢

编辑:
由于有很多人认为这是令人困惑的。我只需要建议我如何将数据从一个页面传递给另一个页面,然后通过电子邮件发送

EDIT : Since, there are a lot who think it's confusing. I just need advice on how I will pass data from one page to another then email.

推荐答案

通过获取名称作为链接,是什么意思?你有数据库中的链接字段与名称一起检索吗?

What do you mean by getting the names as links?. do you have the link field in the database which is retrieved along with the name?

这是基于我从你的模糊问题中理解的解决方案:

This is the solution based on what I understand from your vague question:

您有从数据库检索的名称。还从数据库中检索ID。将这些名称显示为指向不同PHP页面的链接。让我们将php页面命名为user.php。所以链接将是:

You have names which are retrieved from the database. Also retrive the id from the database. Display these names as links pointing to a different PHP page. lets name the php page as user.php. so the link will be:

$name = "You go this name from USER TABLE";
$id = "YOU GOT THIS ID FROM USER TABLE";
<a href="/user.php?userID=<?php echo $id  ?>">$name</a>

现在在您的user.php中,删除id

Now in your user.php, retrive the id

$name = $_GET["userID"]; // make sure you do some parsing to avoid sql injection

// Retrieve all the information about this guy like email address etc from the database
// put everything into a form with a Confirm button which when clicked will mail it to the individual
// I think you should be able to figure out the mail part.

这篇关于在邮寄邮件之前确认消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆