Expand|Select|Wrap|Line Numbers
- <?php
- session_start();
- ob_start();
- $host="localhost";
- $user="bernard";
- $pass="bernard";
- $dbase="myproj";
- mysql_connect($host,$user,$pass);
- mysql_select_db($dbase) or die("Failed to connect".mysql_error());
- $limit=$_SESSION['user'];
- $sql = "SELECT * from user where user = '$limit'";
- $sql2 = mysql_query($sql);
- while($res = mysql_fetch_array($sql2))
- {
- $fname=$res['fname'];
- $add=$res['add'];
- $country=$res['country'];
- $mm=$res['mm'];
- $dd=$res['dd'];
- $yy=$res['yy'];
- $date=$res['today'];
- }
- ?>
- <html>
- <head><title>•• POST A QUESTION & FOLLOW - Bernardo Cunanan ••</title></head>
- <body vlink="black" alink="black" link="black" background="bg.jpg">
- <font face=Arial size=3>
- <center>
- <table border=0>
- <tr>
- <td colspan=3><img src="logo.png"></td>
- </tr>
- <tr>
- <td colspan=3>
- <link href="style.css" rel="stylesheet" type="text/css" />
- <div id="navigation">
- <ul>
- <li><a href="home.php">HOME</a></li>
- <li><a href="about-sign.php">ABOUT</a></li>
- <li><a href="post-sign.php">POST</a></li>
- <li><a href="members-sign.php">MEMBERS</a></li>
- <li><a href="logout.php">LOG-OUT</a></li>
- <li><a href="contact-sign.php">CONTACT US</a></li>
- </ul>
- </div> </td>
- </tr>
- <tr>
- <td background="body.png" height=491 width=883>
- <center>
- <table>
- <tr>
- <td width=200 align=left><center><font color=#696969><img src="pic.jpg" border=4><br>
- <a href="">(change avatar)</a></font></center></td>
- <td width=400><font face=Arial size=4><ul>
- <li>Name: <?php echo $fname; ?></li>
- <li>Birthday: <?php echo $mm; ?> <?php echo $dd; ?> <?php echo $yy; ?></li>
- <li>Address: <?php echo $add; ?>, <?php echo $country; ?></li>
- <li>Member Since: <?php echo $date; ?></li>
- <ul>
- </td>
- <td valign=top width=150 align=right>
- <a href=""><font face=Arial size=4>Edit Profile</font></a>
- </td>
- </tr>
- <tr>
- <td>
- <form>
- <center>
- <a href="new-post.php"><BUTTON name="submit" type="submit" size=5 style=width:150px>
- <font face=Arial size=4>New Post</font></BUTTON></a><br>
- <BUTTON name="reset" type="reset" style=width:150px>
- <font face=Arial size=4>Edit Post</font></BUTTON><br>
- <BUTTON name="reset" type="reset" style=width:150px>
- <font face=Arial size=4>Delete Post</font></BUTTON>
- </center>
- </form>
- </td>
- <td><font face=Arial size=5><i>YOUR POST(s):</i></font>
- <ul><font face=Arial size=4>
- <?php
- $querydisplay = "SELECT * from post where user=$limit";
- $result1 = mysql_query($querydisplay) or die("Query failed with error: ".mysql_error());
- while($topic=mysql_fetch_array($result1))
- {
- echo "<li>";
- echo "<a href=post-view.php>". $topic['topicname']. "</a></li>";
- }
- ?>
- </font>
- </ul>
- </td>
- </tr>
- <tr>
- <td colspan=2 valign=bottom align=left height=50><font face=Arial size=4>Other Information: I am techie critic, I love hot trivias about I.T.</td>
- </tr>
- </table>
- </center>
- </td>
- </tr>
- <table>
- Copyright 2010<br>
- <a href="">College of Information and Communications Technology<br>
- Holy Angel University, Angeles City</a>
- </center>
- </font>
- </body>
- </html>