Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Baby CMS-test</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css">
</head>
<body>
<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);
?>
<?php
include "db.php";
$query = "SELECT * FROM pages WHERE id =". $_GET['id'];
//echo $query;
$rows = $connect->query($query);
foreach ($rows as $row){
$page_id = $row['id'];
$page_title = $row['title'];
$page_content = $row['content'];
$page_img = $row['image'];
}
?>
<?php include "editnav.php"; ?>
<form action="process.php" method="post">
<input type="hidden" name="pageid" value="<?php echo $page_id; ?>">
<input type="text" name="pagetitle" value=" <?php echo $page_title; ?>" > <br>
<textarea name="pagecontent"rows="10" cols="50"><?php echo $page_content; ?></textarea>
<br>
<input type="text" name="pageimage" value="<?php echo $page_image; ?>" >
<input type="submit" name="submit" value="Submit">
</form>
</body>
</html>