Viewing File: D:\INETPUB\VHOSTS\officespacebangalore.com\httpdocs\admin-1\about.php

<?php $title='About page'; require_once __DIR__.'/_header.php';$pdo=db();$row=$pdo->query('SELECT * FROM about ORDER BY id DESC LIMIT 1')->fetch();if($_SERVER['REQUEST_METHOD']==='POST'){check_csrf();$st=$pdo->prepare('UPDATE about SET title=:title,content=:content,image=:image WHERE id=:id');$st->execute(['title'=>$_POST['title']??'About Us','content'=>$_POST['content']??'','image'=>$_POST['image']??'','id'=>$row['id']]);flash('success','About page updated.');go('admin/about.php');} ?><form class="admin-form" method="post"><input type="hidden" name="csrf" value="<?=csrf()?>"><section class="admin-panel"><div class="panel-head"><h2>Edit About content</h2></div><label>Title<input name="title" value="<?=e($row['title']??'About Us')?>"></label><label>Image filename<input name="image" value="<?=e($row['image']??'')?>"></label><label>Content<textarea name="content" rows="22"><?=e($row['content']??'')?></textarea></label><button class="admin-btn" type="submit">Save changes →</button></section></form><?php require __DIR__.'/_footer.php'; ?>
Back to Directory File Manager