mirror of
https://github.com/pikami/palm-paste.git
synced 2025-12-19 08:49:49 +00:00
People can now view pastes!
This commit is contained in:
13
ViewPaste.php
Normal file
13
ViewPaste.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
<?php
|
||||
if(isset($id)){
|
||||
include "config/config.php";
|
||||
$stmt = $conn->query('SELECT * FROM pastes WHERE id='.$id);
|
||||
$result = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
echo "<h1>".$result["title"]."</h1>";
|
||||
echo "<textarea class=\"form-control\" rows=\"5\" disabled=\"true\">".$result["text"]."</textarea>";
|
||||
} else echo "Error: id not set";
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user