0

I need a php script that fetches a registered users info from the Mysql database and prints them on the page when a user visits his/hers profile page via a link showing his name, like facebook

  • Heres the code that id like to show as the profile pag when someone visits it... *

    > <?php
    > require_once('auth.php'); // only for registered users
    > ?>
    > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    > <html xmlns="http://www.w3.org/1999/xhtml">
    > <head>
    > <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    > <title>TCK Portal | Profile</title>
    > <style type="text/css">
    > <!--
    > body {
    > font: 100%/1.4 Verdana, Arial, Helvetica, sans-serif;
    > background: #4E5869;
    > margin: 0;
    > padding: 0;
    > color: #000;
    > background-color: #FFF;
    > }
    >
    >
    > ul, ol, dl {
    > padding: 0;
    > margin: 0;
    > }
    > h1, h2, h3, h4, h5, h6, p {
    > margin-top: 0;
    > padding-right: 15px;
    > padding-left: 15px;
    > font-size: x-large;
    > }
    > a img {
    > border: none;
    > }
    >
    >
    > a:link {
    > color:#414958;
    > text-decoration: underline;
    > }
    > a:visited {
    > color: #4E5869;
    > text-decoration: underline;
    > }
    > a:hover, a:active, a:focus {
    > text-decoration: none;
    > }
    >
    > .container {
    > width: 80%;
    > max-width: 1260px;
    > min-width: 780px;
    > background: #FFF;
    > margin: 0 auto;
    > }
    >
    >
    > .header {
    > background:#414958;
    > }
    >
    > /* ~~ - ~~
    >
    > /
    &gt; .sidebar1 {
    &gt; float: left;
    &gt; width: 20%;
    &gt; background: #93A5C4;
    &gt; padding-bottom: 10px;
    &gt; }
    &gt; .content {
    &gt; padding: 10px 0;
    &gt; width: 80%;
    &gt; float: left;
    &gt; text-align: left;
    &gt; }
    &gt;
    &gt; /
    ~~ - ~~ /
    &gt; .content ul, .content ol {
    &gt; padding: 0 15px 15px 40px;
    &gt; }
    &gt;
    &gt; /
    ~~ - ~~ /
    &gt; ul.nav {
    &gt; list-style: none;
    &gt; border-top: 1px solid #666;
    &gt; margin-bottom: 15px;
    &gt; }
    &gt; ul.nav li {
    &gt; border-bottom: 1px solid #666;
    &gt; }
    &gt; ul.nav a, ul.nav a:visited {
    &gt; padding: 5px 5px 5px 15px;
    &gt; display: block;
    &gt; text-decoration: none;
    &gt; background: #414958;
    &gt; color: #000;
    &gt; }
    &gt; ul.nav a:hover, ul.nav a:active, ul.nav a:focus {
    &gt; background:#414958;
    &gt; color: #FFF;
    &gt; }
    &gt;
    &gt;
    &gt; .footer {
    &gt; padding: 10px 0;
    &gt; background:#414958;
    &gt; position: relative;
    &gt; clear: both;
    &gt; }
    &gt;
    &gt;
    &gt; .fltrt {
    &gt; float: right;
    &gt; margin-left: 8px;
    &gt; }
    &gt; .fltlft {
    &gt; float: left;
    &gt; margin-right: 8px;
    &gt; }
    &gt; .clearfloat {
    &gt; clear:both;
    &gt; height:0;
    &gt; font-size: 1px;
    &gt; line-height: 0px;
    &gt; }
    &gt; #apDiv1 {
    &gt; position:absolute;
    &gt; left:321px;
    &gt; top:162px;
    &gt; width:142px;
    &gt; height:89px;
    &gt; z-index:1;
    &gt; }
    &gt; #apDiv2 {
    &gt; position:absolute;
    &gt; left:368px;
    &gt; top:193px;
    &gt; width:146px;
    &gt; height:221px;
    &gt; z-index:1;
    &gt; }
    &gt; --&gt;
    &gt; &lt;/style&gt;&lt;!--[if lte IE 7]&gt;
    &gt; &lt;style&gt;
    &gt; .content { margin-right: -1px; }
    &gt; ul.nav a { zoom: 1; }
    &gt; &lt;/style&gt;
    &gt; &lt;![endif]--&gt;
    &gt; &lt;/head&gt;
    &gt;
    &gt; &lt;body&gt;
    &gt; &lt;div class=&quot;container&quot;&gt;
    &gt; &lt;div class=&quot;header&quot;&gt;&lt;a href=&quot;#&quot; class=&quot;header&quot;&gt;&lt;img src=&quot;&quot; alt=&quot;Insert Logo Here&quot; name=&quot;Insert_logo&quot; width=&quot;882&quot; height=&quot;100&quot; id=&quot;Insert_logo&quot; style=&quot;background: #414958; display:block;&quot; color:=&quot;color:&quot; #414958;&quot; /&gt;&lt;/a&gt;
    &gt; &lt;!-- end .header --&gt;&lt;/div&gt;
    &gt; &lt;div class=&quot;sidebar1&quot;&gt;
    &gt; &lt;ul class=&quot;nav&quot;&gt;
    &gt; &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Who's Online?&lt;/a&gt;&lt;/li&gt;
    &gt; &lt;li&gt;&lt;a href=&quot;#&quot; title=&quot;Profile&quot; target=&quot;_self&quot;&gt;Profile&lt;/a&gt;&lt;/li&gt;
    &gt; &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Search&lt;/a&gt;&lt;/li&gt;
    &gt; &lt;li&gt;&lt;a href=&quot;#&quot;&gt;Groups&lt;/a&gt;&lt;/li&gt;
    &gt; &lt;li&gt;&lt;a href=&quot;logout.php&quot; target=&quot;_self&quot;&gt;Logout&lt;/a&gt;&lt;/li&gt;
    &gt; &lt;/ul&gt;
    &gt;
    &gt; &lt;!-- end .sidebar1 --&gt;&lt;/div&gt;
    &gt; &lt;div class=&quot;content&quot;&gt;
    &gt; ** ////////////////////////////// DISPLAY THE USER INFO HERE \\\\\\\\\\\\\\\\\\\\\\
    &gt; ////////////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\*

    > </div>
    >
    > <div class="footer">
    > <!-- end .footer --></div>
    > <!-- end .container --></div>
    > </body>
    > </html>
    >
    > Inline Code Example Here

    Pls help!!!!!

Edited by Dani: Formatting ... Don't use quote arrows next time

2
Contributors
1
Reply
12
Views
5 Years
Discussion Span
Last Post by Dani
0

Here's the code properly formatted:

     <?php
        require_once('auth.php'); // only for registered users
     ?>
     <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     <html xmlns="http://www.w3.org/1999/xhtml">
     <head>
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
     <title>TCK Portal | Profile</title>
     <style type="text/css">
     <!--
     body {
        font: 100%/1.4 Verdana, Arial, Helvetica, sans-serif;
        background: #4E5869;
        margin: 0;
        padding: 0;
        color: #000;
        background-color: #FFF;
     }


     ul, ol, dl { 
        padding: 0;
        margin: 0;
     }
     h1, h2, h3, h4, h5, h6, p {
        margin-top: 0;   
        padding-right: 15px;
        padding-left: 15px; 
        font-size: x-large;
     }
     a img { 
        border: none;
     }


     a:link {
        color:#414958;
        text-decoration: underline; 
     }
     a:visited {
        color: #4E5869;
        text-decoration: underline;
     }
     a:hover, a:active, a:focus { 
        text-decoration: none;
     }

     .container {
        width: 80%;
        max-width: 1260px;
        min-width: 780px;
        background: #FFF;
        margin: 0 auto; 
     }


     .header {
        background:#414958;
     }

     /* ~~ - ~~ 

     */
     .sidebar1 {
        float: left;
        width: 20%;
        background: #93A5C4;
        padding-bottom: 10px;
     }
     .content {
        padding: 10px 0;
        width: 80%;
        float: left;
        text-align: left;
     }

     /* ~~ - ~~ */
     .content ul, .content ol { 
        padding: 0 15px 15px 40px; 
     }

     /* ~~ - ~~ */
     ul.nav {
        list-style: none; 
        border-top: 1px solid #666; 
        margin-bottom: 15px; 
     }
     ul.nav li {
        border-bottom: 1px solid #666; 
     }
     ul.nav a, ul.nav a:visited { 
        padding: 5px 5px 5px 15px;
        display: block; 
        text-decoration: none;
        background: #414958;
        color: #000;
     }
     ul.nav a:hover, ul.nav a:active, ul.nav a:focus { 
        background:#414958;
        color: #FFF;
     }


     .footer {
        padding: 10px 0;
        background:#414958;
        position: relative;
        clear: both; 
     }


     .fltrt {  
        float: right;
        margin-left: 8px;
     }
     .fltlft { 
        float: left;
        margin-right: 8px;
     }
     .clearfloat { 
        clear:both;
        height:0;
        font-size: 1px;
        line-height: 0px;
     }
     #apDiv1 {
        position:absolute;
        left:321px;
        top:162px;
        width:142px;
        height:89px;
        z-index:1;
     }
     #apDiv2 {
        position:absolute;
        left:368px;
        top:193px;
        width:146px;
        height:221px;
        z-index:1;
     }
     -->
     </style><!--[if lte IE 7]>
     <style>
     .content { margin-right: -1px; } 
     ul.nav a { zoom: 1; }  
     </style>
     <![endif]-->
     </head>

     <body>
     <div class="container">
       <div class="header"><a href="#" class="header"><img src="" alt="Insert Logo Here" name="Insert_logo" width="882" height="100" id="Insert_logo" style="background: #414958; display:block;" color:="color:" #414958;"  /></a> 
       <!-- end .header --></div>
       <div class="sidebar1">
         <ul class="nav">
           <li><a href="#">Who's Online?</a></li>
           <li><a href="#" title="Profile" target="_self">Profile</a></li>
           <li><a href="#">Search</a></li>
           <li><a href="#">Groups</a></li>
           <li><a href="logout.php" target="_self">Logout</a></li>
         </ul>

       <!-- end .sidebar1 --></div>
       <div class="content">
        ** ////////////////////////////// DISPLAY THE USER INFO HERE \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
         ////////////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\**
         </div>

       <div class="footer">
       <!-- end .footer --></div>
     <!-- end .container --></div>
     </body>
     </html>
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.