PHP Classes

File: fwphp/glomodul/z_examples/MVC_FW/03xuding_users2017/read.php

Recommend this page to a friend!
  Classes of Slavko Srakocic   B12 PHP FW   fwphp/glomodul/z_examples/MVC_FW/03xuding_users2017/read.php   Download  
File: fwphp/glomodul/z_examples/MVC_FW/03xuding_users2017/read.php
Role: Example script
Content type: text/plain
Description: Example script
Class: B12 PHP FW
Manage database records with a PDO CRUD interface
Author: By
Last change: Update of fwphp/glomodul/z_examples/MVC_FW/03xuding_users2017/read.php
Date: 1 year ago
Size: 2,345 bytes


Class file image Download
//defined('ROOTDIR') or define('ROOTDIR',$_SERVER['DOCUMENT_ROOT']);
$id = null;
    if ( !empty(
$_GET['id'])) {
$id = $_GET['id'];
    if (
null==$id ) {
header("Location: index.php");
    } else {
$pdo = Database::connect();
$sql = "SELECT * FROM users where user_id = ?";
$q = $pdo->prepare($sql);
$row = $q->fetch(PDO::FETCH_ASSOC);

<!DOCTYPE html>
<html lang="en">
    <meta charset="utf-8">
    <!--link href="css/bootstrap.min.css" rel="stylesheet"-->
      <link href="<?= CSSURL.'/bootstrap.min.css' ?>"
            rel="stylesheet" type="text/css">
    <!--script src="js/bootstrap.min.js"></script-->
    <script src="<?= CSSURL.'/bootstrap.min.js' ?>"></script>
    <div class="container">
      <div class="span10 offset1">
        <div class="row">
            <h3>Read a Customer</h3>
        <div class="form-horizontal" >
          <div class="control-group">
            <label class="control-label">Name</label>
            <div class="controls">
                <label class="checkbox">
                    <?php echo $row['user_name'];?>
        <div class="control-group">
            <label class="control-label">Email Address</label>
            <div class="controls">
                <label class="checkbox">
                    <?php echo $row['user_email'];?>

          <div class="control-group">
            <label class="control-label">Mobile Number</label>
            <div class="controls">
                <label class="checkbox">
                    <?php echo $row['user_telefon'];?>

          <div class="form-actions">
              <a class="btn" href="index.php">Back</a>
    </div> <!-- /container -->