允许管理员用户编辑网站内容

我创建了一个网站,我希望某些用户能够在看到需要更改的内容时登录并编辑内容。我使用 password_hash 作为密码。


但是现在我对如何让这些用户编辑网站上的内容感到困惑,例如我有以下代码:


<div class="-container-white" style="padding:128px 16px" id="charities">

  <h3 class="-center">SUPPORTING CHARITIES</h3>


  <p>Over the years we have been helping raise money for a number of charities.</p>

  <p>These include:</p>

  <ul>

    <li>Cash For Kids</li>

    <li>Cancer Research</li>

</ul>


<p>We also have helped numerous organisations out by donating products they can use in their raffles</p>

<p> If you know of any charities or would like to discuss having products donated for raffles please do not hesitate to get in touch</p>



<p>We are proud to to support these charities and can not thank you, customers, enough for helping us do this</p>



  <div class="-row-padding -center" style="margin-top:64px">


  </div>

</div>

现在拥有这些用户的目的是让更新网站更容易,因此如果他们发现错误,他们可以轻松更改它而无需让我进入代码并更改它。为了允许这种情况发生,我需要更改什么,即一旦其中一个管理员用户登录,就可以编辑它。


白衣染霜花
浏览 156回答 1
1回答
打开App,查看更多内容
随时随地看视频慕课网APP