简体   繁体   English

PHP - 在输入框中显示检索到的电子邮件地址

[英]PHP - display retrieved email address in input box

Using php/html, I want to retrieve email addresses (plus other information) from MySQL and then display the email addresses in an input box on a form. 使用php / html,我想从MySQL检索电子邮件地址(以及其他信息),然后在表单的输入框中显示电子邮件地址。 This will enable users to edit and submit corrected email addresses. 这将使用户能够编辑和提交更正的电子邮件地址。 However the retrieved email address does not display correctly in the input box. 但是,检索到的电子邮件地址无法在输入框中正确显示。 All other retrieved information display correctly. 所有其他检索到的信息正确显示 A section of the code is as shown below: 代码的一部分如下所示:

 <tr><td ><span style=color:#125eaa><strong>Email</strong></style></td><td ><input style=background-color:#e2ffc6 name=email type=text id=email value=$email></td></tr>
<tr><td ><span style=color:#125eaa><strong> Address Line 1</strong></style></td><td ><input style=background-color:#e2ffc6 name=ad1 type=text id=ad1 value='$ad1'></td></tr> 

The "Address Line 1" displays correctly but the email does not. “地址行1”显示正确但电子邮件没有显示。 I tried: type=email, but it did not resolve the issue. 我试过:type = email,但它没有解决问题。

在此输入图像描述

Any help greatly appreciated. 任何帮助非常感谢。

Thanks, 谢谢,

His problem could be an artifact of a resident javascript that's cloaking the e-mail address with a script obfuscation, which is why he's seeing part of the opening script tag. 他的问题可能是使用脚本混淆隐藏电子邮件地址的常驻javascript的工件,这就是他看到开放脚本标记的一部分的原因。 Disable the cloaking script before writing e-mail addresses to values in input statements. 在将电子邮件地址写入输入语句中的值之前禁用隐藏脚本脚本。

<tr><td><span style="color:#125eaa;"><strong>Email</strong></span></td><td><input style="background-color:#e2ffc6;" name="email" type="text" id="email" value="<?php echo $email; ?>" /></td></tr>

<tr><td><span style="color:#125eaa;"><strong>Address Line 1</strong></span></td><td><input style="background-color:#e2ffc6;" name="ad1" type="text" id="ad1" value="<?php echo $ad1; ?>" /></td></tr> 

Put quotes around all attributes. 在所有属性周围加上引号。 And, without seeing more code I can only assume you need to display the variables with php, not simply straight HTML. 并且,在没有看到更多代码的情况下,我只能假设您需要使用php显示变量,而不仅仅是直接的HTML。 You've also got closing </style> tags instead of closing </span> tags. 您还有关闭</style>标签而不是关闭</span>标签。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将电子邮件发送到从数据库检索的电子邮件地址中,该会话由PHP中的会话发起 - Sending email to email address retrieved from database Initiated by session in PHP PHP中的自动填充电子邮件输入框 - Autofill email input box in php 将电子邮件发送到从数据库检索到的电子邮件地址由PHP Array中的会话启动到字符串转换? - Sending email to email address retrieved from database Initiated by session in PHP Array to string conversion? PHP创建图像来显示电子邮件地址? - PHP create image to display email address? Facebook SDK PHP显示用户的电子邮件地址 - Facebook SDK PHP Display a users email address 将PHP上的电子邮件结果发送到用户输入的电子邮件地址 - Email results on a PHP to user-input email address 将从数据库检索到的记录显示在对话框中 - To display the records retrieved from database into a dialog box php联系人表单,可在收件箱中显示发件人的电子邮件地址 - php contact form to display the email address of the sender in inbox PHP标头代码不显示电子邮件中的地址,而是显示服务器默认地址 - PHP headers code does not display address in email, instead show server default address 在 html/php 中为输入 RGB 值在框中显示颜色 - Display the Color in a box for input RGB values in html/php
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM