duanlu1922 2016-10-01 07:20
浏览 61
已采纳

使用html表单更改函数的php echo消息?

I would like through a change the message html form a "php echo" I thought maybe there would be a way to edit the php file to display a message type or another as edit from the form. I would do it without having to make another request to a database.

The "echo" I want to change is this when you end the function that sends the data to the database.

if ($name){
$sql= "INSERT INTO box (name, mensaje) VALUES ('$name', '$mensaje')";   
mysqli_query($DB, $sql);

echo "All it uploaded correctly, but on Saturday, opening day,
 have to wait until an administrator validate the content. Thank you.";
}

Perhaps the question is silly, but I've never done something like and now I can not think how.

Would there be any way to edit the file "echo php" from a form? Is there any other way?

  • 写回答

1条回答 默认 最新

  • douxing6434 2016-10-01 07:27
    关注

    I'm pretty sure the short answer is no. And from a security point of view that's a good thing. That is, you do not want anyone to be able to come along and edit your website from without.

    If I understand you correctly, you want to be able to vary the message that is echoed after your query. You could set up another page with a form that let's you securely configure the message that is to be displayed. You'd need to persist the message and retrieve it in your function prior to displaying it.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 多址通信方式的抗噪声性能和系统容量对比
  • ¥15 winform的chart曲线生成时有凸起
  • ¥15 msix packaging tool打包问题
  • ¥15 finalshell节点的搭建代码和那个端口代码教程
  • ¥15 用hfss做微带贴片阵列天线的时候分析设置有问题
  • ¥15 Centos / PETSc / PETGEM
  • ¥15 centos7.9 IPv6端口telnet和端口监控问题
  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 海浪数据 南海地区海况数据,波浪数据