O'Reilly logo

CouchDB and PHP Web Development Beginner's Guide by Tim Juravich

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action — creating the user profile

We're going to clean up the user view a few times in this chapter. But, let's start by just dumping out all of the user document content into our view.

  1. Create a view called user/profile.php inside the views directory in our working folder.
  2. Make a simple header for the profile with the following HTML:
    <div class="page-header">
    <h1>User Profile</h1>
    </div>
    
  3. Since we don't have much of a design yet, let's just use var_dump to show all of the contents of the User document:
    <div class="page-header">
    <h1>User Profile</h1>
    </div>
    <div class="container">
    <div class="row">
    <?php var_dump($user); ?>
    </div>
    </div>
    
    

What just happened?

We just created a very basic user profile with a header to tell us that this page ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required