Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New Coder
    Join Date
    Aug 2010
    Posts
    36
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Need help with PM system

    Everytime i try to delete a message in my inbox, it goes to deleted page and says it was deleted, but if you go back, it is still there.

    The links are http://www.triplenines.com/member_account.php
    http://www.triplenines.com/delete_message.php

    heres my coding for the inbox page

    PHP Code:
    <?php
    session_start
    (); 
    $toplinks "";
    if (isset(
    $_SESSION['id'])) {
        
    $userid $_SESSION['id'];
        
    $username $_SESSION['username'];
        
    $toplinks '<a href="member_profile.php?id=' $userid '">' $username '</a> &bull; 
        <a href="member_account.php"><input type="submit" name="Account" value="Account" /></a>
        <a href="logout.php"><input type="submit" name="Log out" value="Log out" /></a>'
    ;
    } else {
        echo 
    'Please <a href="login.php"><input type="submit" name="Login" value="Login" /></a> to access your account';
        exit(); 
    }
    ?>
    <?php
    include_once "connect_to_mysql.php";
    $sql mysql_query("SELECT * FROM members WHERE id='$userid'"); 
    while(
    $row mysql_fetch_array($sql)){
    $country $row["country"];
    $state $row["state"];
    $city $row["city"];
    $accounttype $row["accounttype"];    
    $bio $row["bio"];    
    }
    if (
    $accounttype == "a") {
        
    $userOptions "You get options for Normal User";
    } else if (
    $accounttype == "b") {
        
    $userOptions "You get options for Expert User";
    } else {
        
    $userOptions "You get options for Super User";
    }
    ?>
    <!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>Triplenines 999 - Member account</title>
    <style type="text/css"> 

    body  {
        font: 100% Verdana, Arial, Helvetica, sans-serif;
        margin: 0;
        padding: 0;
        color: #000000;
        width: 500px;
        background-color: #666;
        font-family: Verdana, Geneva, sans-serif;
        background-image: url(pictures/logo%20buttons/29410-Clipart-Illustration-Of-Sparkling-White-Delicate-Grasses-Over-A-Light-Blue-Background.jpg);
    }


    .thrColHybHdr #container {
        width: 800px;
        background: #FFFFFF; 
        margin-right: 0%;
        margin-left: 250px;
    }  
    .thrColHybHdr #header {
        outline-style: none;
        background-color: #FFF;
        width: 780px;
        padding-top: 0;
        padding-right: 10px;
        padding-bottom: 0;
        padding-left: 10px;

    .thrColHybHdr #header h1 {
        margin: 0; 
        padding: 10px 0; 
        text-align: center;
    }


    .thrColHybHdr #sidebar1 {
        float: left;
        width: 100%; 
        background: #EBEBEB; 
        background-color: #FFF;
        color: #000;
        padding-top: 0px;
        padding-right: 0;
        padding-bottom: 0px;
        padding-left: 0;
    }
    .thrColHybHdr #sidebar2 {
        float: right;
        width: 100%; 
        background: #EBEBEB; 
        background-color: #FFF;
        padding-top: 0px;
        padding-right: 0;
        padding-bottom: 0px;
        padding-left: 0;
    }
    .thrColHybHdr #sidebar3 {
        float: right;
        width: 170px;
        background-color: #FFF;
        padding-right: 0;
        padding-left: 0;
        text-align: left;
    }
    .thrColHybHdr #sidebar4 {
        float: right;
        width: 170px; 
        background-color: #FFF;
        padding-right: 0;
        padding-left: 0;
        text-align: left;
    }

    .thrColHybHdr #sidebar1 h3, .thrColHybHdr #sidebar1 p, .thrColHybHdr #sidebar2 p, .thrColHybHdr #sidebar2 h3 {
        margin-left: 10px; 
        margin-right: 10px;
        color: #000;
    }


    .thrColHybHdr #mainContent {
        margin-top: 5px;
        margin-right: 0em;
        padding-top: 4px;
        padding-right: 0em;
        padding-bottom: 0;
        padding-left: 0em;
        width: 100%;
        margin-left: 0em;
        text-align: left;

    .thrColHybHdr #mainContent1 {
        margin-top: 40em;
        margin-right: 0em;
        padding-top: 0px;
        padding-right: 0em;
        padding-bottom: 0;
        padding-left: 0em;
        width: 100%;
        text-align: left;

    .thrColHybHdr #footer {
        padding: 0 10px; 
        background:#DDDDDD;
        background-color: #CCC;

    .thrColHybHdr #footer p {
        margin: 0; 
        padding: 10px 0; 
    }


    .fltrt { 
        float: right;
        margin-left: 8px;
    }
    .fltlft { 
        float: left;
        margin-right: 8px;
    }
    .clearfloat { 
        clear:both;
        height:0;
        font-size: 1px;
        line-height: 0px;
    }
    .thrColHybHdr #container #sidebar3 h5 {
        text-align: center;
    }
    .thrColHybHdr #container #sidebar3 table tr th {
        text-align: center;
    }
    .thrColHybHdr #container #mainContent1 {
        text-align: center;
        font-size: 90%;
        margin-top: 2em;
    }
    .thrColHybHdr #container #mainContent h5 {
        text-align: center;
    }



    </style>
    <script type="text/javascript">

    function MM_swapImgRestore() { 
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    }
    function MM_preloadImages() { 
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    }

    function MM_findObj(n, d) { 
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    }

    function MM_swapImage() { 
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    }

    </script>
    </head>

    <body class="thrColHybHdr" onload="MM_preloadImages('pictures/dresses/W01-2.jpg','pictures/dresses/A01b.jpg','pictures/actor1.GIF','pictures/director.jpg','pictures/film1.JPG','pictures/head4.JPG','pictures/logo buttons/w012color.JPG','pictures/logo buttons/header.jpg','pictures/logo buttons/home1.JPG','pictures/logo buttons/products1.JPG','pictures/logo buttons/customize1.JPG','pictures/logo buttons/testimonials1.JPG','pictures/logo buttons/friends1.JPG')">

    <div id="container">

      <div id="header">

    <script type="text/javascript">
    var k_push_vars = {
        "display_after": 30,
        "view_percentage": 40,
        "popup_font_color": "#000000",
        "popup_background": "#ffffff",
        "popup_separator": "#D4E2F0",
        "header": "Your feedback is important to us!",
        "question": "Would you be willing to give us a short (1 minute) feedback?",
        "footer": "Thank you for helping us improve our website",
        "remind": "Remind me later",
        "remind_font_color": "#3882C3",    
        "yes": "Yes",
        "no": "No",
        "text_direction": "ltr",
        "images_dir": "http://cf.kampyle.com/",
        "yes_background": "#76AC78",
        "no_background": "#8D9B86",
        "site_code": 6231394
    }
    </script>

    <link rel="stylesheet" type="text/css" media="screen" href="http://cf.kampyle.com/k_button.css" />

        <h1 ><a href="index.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image8','','pictures/logo buttons/header.jpg',1)"><img src="pictures/logo buttons/header.jpg" name="Image8" width="780" height="285" border="0" id="Image8" /></a><a href="index.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image26','','pictures/logo buttons/w012color.JPG',1)"></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image7','','pictures/head4.JPG',1)"></a></h1>
     <div align="center"></div>
    </div>
    <div id="mainContent">


    <div id='k_close_button' class='k_float kc_bottom_sl kc_right'></div><div><a href='http://www.kampyle.com/feedback_form/ff-feedback-form.php?site_code=6231394&amp;lang=en&amp;form_id=54960'  target='kampyleWindow' id='kampylink' class='k_float k_bottom_sl k_right' onclick="javascript:k_button.open_ff('site_code=6231394&amp;lang=en&amp;form_id=54960');return false;"><img src="http://cf.kampyle.com/buttons/en/orange/en-orange-corner-low-right.gif" alt="Feedback Form" border="0"/></a></div>
    <div id='k_slogan' class='k_float k_bottom k_right'></div>
    <script src="http://cf.kampyle.com/k_button.js" type="text/javascript"></script>
    <script src="http://cf.kampyle.com/k_push.js" type="text/javascript"></script>

        <div align="center">
          <div id='k_slogan2' class='k_float k_bottom k_right'></div>
          <script src="http://cf.kampyle.com/k_button.js" type="text/javascript"></script>
          <script src="http://cf.kampyle.com/k_push.js" type="text/javascript"></script>

          <div align="center"><a href="index.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image9','','pictures/logo buttons/home1.JPG',1)"><img src="pictures/logo buttons/home.JPG" name="Image9" width="153" height="61" border="0" id="Image9" /></a><a href="index.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image26','','pictures/logo buttons/w012color.JPG',1)"></a><a href="index.html"></a><a href="choose.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image10','','pictures/logo buttons/products1.JPG',1)"><img src="pictures/logo buttons/products.JPG" name="Image10" width="155" height="61" border="0" id="Image10" /></a><a href="customize.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image11','','pictures/logo buttons/customize1.JPG',1)"><img src="pictures/logo buttons/customize.JPG" name="Image11" width="156" height="61" border="0" id="Image11" /></a><a href="reviews.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image12','','pictures/logo buttons/testimonials1.JPG',1)"><img src="pictures/logo buttons/testimonials.JPG" name="Image12" width="157" height="61" border="0" id="Image12" /></a><a href="friends.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image13','','pictures/logo buttons/friends1.JPG',1)"><img src="pictures/logo buttons/friends.JPG" name="Image13" width="159" height="61" border="0" id="Image13" /></a></div>
    </div>
        <h5 align="center">&nbsp;</h5>
    <link rel="stylesheet" type="text/css" href="http://www.htmlcommentbox.com/static/skins/simple/skin.css" />
     <script type="text/javascript" language="javascript" id="hcb"> /*<!--*/ (function(){s=document.createElement("script");s.setAttribute("type","text/javascript");s.setAttribute("src", "http://www.htmlcommentbox.com/jread?page="+escape((typeof hcb_user !== "undefined" && hcb_user.PAGE)||(""+window.location)).replace("+","%2B")+"&mod=%241%24wq1rdBcg%240R468TQEsgmO/QS9vjIxv0"+"&opts=2014&num=25");if (typeof s!="undefined") document.getElementsByTagName("head")[0].appendChild(s);})(); /*-->*/ </script>

      </div>
      <body>
    <table style="background-color: #CCC; text-align: center;" width="100%" border="0" cellpadding="12">
      <tr>
        <td width="78%"><h5>Member account</h5></td>
        <td width="22%"><?php echo $toplinks?></td>
      </tr>
    </table>
    <h3><?php echo "$username"?></h3>
    <table width="768" cellpadding="3" cellspacing="3" style="line-height:1.5em;">
      <tr>
        <td width="139" valign="top" bgcolor="#E4E4E4">YOUR ACCOUNT<br />
            <a href="edit_info.php" target="_self">Edit Information </a><br />
        <a href="edit_pic.php" target="_self">Edit Picture</a><br />    
        <a href="member_profile.php?id=<?php echo "$userid"?>" target="_self">View Profile</a><br />
        </td>

        <td width="174" valign="top"><div align="center"><img src="memberFiles/<?php echo "$userid"?>/pic1.jpg" alt="Ad" width="150" /></div></td>
        <td width="423" valign="top">
          Country: <?php echo "$country"?> <br />
          State: <?php echo "$state"?><br />
          City: <?php echo "$city"?><br />
        </td>
      </tr>
      <tr>
        <td valign="top" bgcolor="#FFFFFF">&nbsp;</td>
        <td valign="top">&nbsp;</td>
        <td valign="top"><p>Bio:<br />
            <br />
      <?php echo "$bio"?><br />
        </p></tr>
    </table>
    <h5 align="left">
      <?php
    if ($username){
        echo 
    "<a href='create_message.php'>Create Message</a>
        <div id='box'>
          <b class='corners'>
          <b class='corners1'><b></b></b>
          <b class='corners2'><b></b></b>
          <b class='corners3'></b>
          <b class='corners4'></b>
          <b class='corners5'></b></b>
          <div class='cornersfg'>
            <div id='top'>Inbox for $username</div>
            <div id='bottom' style='padding: 10px;'>"
    ;
            
    ////////////////////////////////////////////////////////////////////////
            
    require('connect_to_mysql.php');
            
    $query mysql_query("SELECT * FROM messages WHERE to_user='$username' ORDER BY id DESC");
            
    $numrows mysql_num_rows($query);
            if (
    $numrows 0){
                echo 
    "<form action='delete_message.php' method='POST'>";
                echo 
    "<div id='messages'>
                <div id='leftside'><input type='checkbox' name='selectall'><input type='submit' name='deleteinbox' value='Delete' class='button'></div>
                <div id='rightside'>Date</div>
                <div id='center'>Subject and Message</div>
                <div style='clear: both;'></div>
                </div>"
    ;
                
                while(
    $row mysql_fetch_assoc($query)){
                    
    $msg_id $row['id'];
                    
    $msg_to_user $row['to_user'];
                    
    $msg_to_id $row['to_id'];
                    
    $msg_from_user $row['from_user'];
                    
    $msg_from_id $row['from_id'];
                    
    $msg_subject $row['subject'];
                    
    $msg_content $row['content'];
                    
    $msg_date $row['date'];
                    
    $msg_from_delete $row['from_delete'];
                    
    $msg_to_delete $row['to_delete'];
                    
                    if (!
    $msg_to_delete){
                        echo 
    "<div id='messages'>";
                        echo 
    "<div id='leftside'>
                        <input type='checkbox' name='cb$msg_id' value='$msg_id'>
                        <a href='member_account.php?id=$msg_from_id' target='_blank'>$msg_from_user</a>
                        </div>"
    ;
                        echo 
    "<div id='rightside'>$msg_date</div>";
                        
                        echo 
    "<div id='center'>
                        <span class='toggle'><a href='#'>$msg_subject</a></span>
                        <div class='hiddenDiv'>
                        <br>$msg_content<br><br>
                        <span class='toggle'><a href='#'>REPLY</a></span>
                        <div class='hiddenDiv'>
                        <form action='reply.php' method='POST'>
                            <input type='hidden' value='$msg_id' name='replyid'>
                            <input type='text' name='replysubject' style='width: 300px;' class='text-box' value='RE: $msg_subject'><br>
                            <textarea name='replycontent' style='width: 298px;' rows='5'></textarea><br><br>
                            <input type='submit' name='replybutton' class='button' value='Reply'>
                        </form>
                        </div>
                        </div>
                        </div>"
    ;
                        
                        echo 
    "<div style='clear: both;'></div>";
                        echo 
    "</div>";
                        
    $num += 1;
                    }
                }
                if (
    $num == 0){
                    echo 
    "You have no messages in your inbox.";
                }
                echo 
    "</form>";
            }
            else
                echo 
    "You have no messages in your inbox.";
            
    ////////////////////////////////////////////////////////////////////////
        
    echo "</div>
          </div>
          <b class='corners'>
          <b class='corners5'></b>
          <b class='corners4'></b>
          <b class='corners3'></b>
          <b class='corners2'><b></b></b>
          <b class='corners1'><b></b></b></b>
        </div>"
    ;
        
    /////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////
    /////////////////////////////////////////////////////////////////////////////////////

        
    echo "<div id='box'>
          <b class='corners'>
          <b class='corners1'><b></b></b>
          <b class='corners2'><b></b></b>
          <b class='corners3'></b>
          <b class='corners4'></b>
          <b class='corners5'></b></b>
          <div class='cornersfg'>
            <div id='top'>Outbox for $username</div>
            <div id='bottom' style='padding: 10px;'>"
    ;
            
    ////////////////////////////////////////////////////////////////////////
            
    require('connect_to_mysql.php');
            
    $query mysql_query("SELECT * FROM messages WHERE from_user='$username' ORDER BY id DESC");
            
    $numrows mysql_num_rows($query);
            if (
    $numrows 0){
                echo 
    "<form action='delete_message.php' method='POST'>";
                echo 
    "<div id='messages'>
                <div id='leftside'><input type='checkbox' name='selectall'><input type='submit' name='deleteoutbox' value='Delete' class='button'></div>
                <div id='rightside'>Date</div>
                <div id='center'>Subject and Message</div>
                <div style='clear: both;'></div>
                </div>"
    ;
                
                while(
    $row mysql_fetch_assoc($query)){
                    
    $msg_id $row['id'];
                    
    $msg_to_user $row['to_user'];
                    
    $msg_to_id $row['to_id'];
                    
    $msg_from_user $row['from_user'];
                    
    $msg_from_id $row['from_id'];
                    
    $msg_subject $row['subject'];
                    
    $msg_content $row['content'];
                    
    $msg_date $row['date'];
                    
    $msg_from_delete $row['from_delete'];
                    
    $msg_to_delete $row['to_delete'];
                    
                    if (!
    $msg_from_delete){
                        echo 
    "<div id='messages'>";
                        echo 
    "<div id='leftside'>
                        <input type='checkbox' name='cb$msg_id' value='$msg_id'>
                        <a href='profile.php?id=$msg_from_id' target='_blank'>$msg_from_user</a>
                        </div>"
    ;
                        echo 
    "<div id='rightside'>$msg_date</div>";
                        
                        echo 
    "<div id='center'>
                        <span class='toggle'><a href='#'>$msg_subject</a></span>
                        <div class='hiddenDiv'>
                        <br>$msg_content<br><br>
                        </div>
                        </div>"
    ;
                        
                        echo 
    "<div style='clear: both;'></div>";
                        echo 
    "</div>";
                        
    $num += 1;
                    }
                }
                if (
    $num == 0){
                    echo 
    "You have no messages in your outbox.";
                }
                echo 
    "</form>";
            }
            else
                echo 
    "You have no messages in your outbox.";
            
    ////////////////////////////////////////////////////////////////////////
        
    echo "</div>
          </div>
          <b class='corners'>
          <b class='corners5'></b>
          <b class='corners4'></b>
          <b class='corners3'></b>
          <b class='corners2'><b></b></b>
          <b class='corners1'><b></b></b></b>
        </div>"
    ;
        
        echo 
    "</div>";
    }
    else
        echo 
    "<center><h2><font color='red'>You must be logged in to view this page.</font></h2></center>";
    require(
    'connect_to_mysql.php'); ?>
      </h3>
    <p>
    </body>
     
      <br class="clearfloat" />
      <div id="mainContent1">
          <h5><a href="contactus.php">Contact Us</a> <a href="privacy.php">Privacy</a> <a href="sizing.php">Sizing</a> <a href="shippingandreturns.php">Shipping and Returns</a> <a href="aboutus.php">About Us</a> <a target="_blank"href="catalogue.php">Catalogue</a></h5>
    </div>
      <div id="footer">
        <p>© 2010 Triplenines.com a division of 999</p>
    </div>
    </div>

    </body>
    </html>
    My deleted page code will be in the nxt post because my te

  • #2
    New Coder
    Join Date
    Aug 2010
    Posts
    36
    Thanks
    8
    Thanked 0 Times in 0 Posts
    Here's my code for the deleted page

    PHP Code:
    <?php
    session_start
    ();

    $toplinks "";
    if (isset(
    $_SESSION['id'])) {
        
    $userid $_SESSION['id'];
        
    $username $_SESSION['username'];
        
    $toplinks '<a href="member_profile.php?id=' $userid '">' $username '</a> &bull; 
        <a href="member_account.php"><input type="submit" name="Account" value="Account" /></a>
        <a href="logout.php"><input type="submit" name="Log out" value="Log out" /></a>'
    ;
    } else {
        
    $toplinks '<a href="join_form.php"><input type="submit" name="Register" value="Register" /><a href="login.php"><input type="submit" name="Login" value="Login" /></a>';

    ?>
    <!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>Triplenines 999 - Delete message</title>
    <style type="text/css"> 
     
    body  {
        font: 100% Verdana, Arial, Helvetica, sans-serif;
        margin: 0; 
        padding: 0; 
        color: #000000;
        width: 500px;
        background-color: #666;
        font-family: Verdana, Geneva, sans-serif;
        background-image: url(pictures/logo%20buttons/29410-Clipart-Illustration-Of-Sparkling-White-Delicate-Grasses-Over-A-Light-Blue-Background.jpg);
    }


    .thrColHybHdr #container {
        width: 800px;
        background: #FFFFFF; 
        margin-right: 0%;
        margin-left: 250px;
    }  
    .thrColHybHdr #header {
        outline-style: none;
        background-color: #FFF;
        width: 780px;
        padding-top: 0;
        padding-right: 10px;
        padding-bottom: 0;
        padding-left: 10px;

    .thrColHybHdr #header h1 {
        margin: 0; 
        padding: 10px 0; 
        text-align: left;
    }


    .thrColHybHdr #sidebar1 {
        float: left;
        width: 11em; 
        background: #EBEBEB;
        background-color: #FFF;
        color: #000;
        padding-top: 0px;
        padding-right: 0;
        padding-bottom: 0px;
        padding-left: 0;
    }
    .thrColHybHdr #sidebar2 {
        float: right;
        width: 100%; 
        background: #EBEBEB; 
        background-color: #FFF;
        padding-top: 0px;
        padding-right: 0;
        padding-bottom: 0px;
        padding-left: 0;
    }
    .thrColHybHdr #sidebar3 {
        float: right;
        width: 170px; 
        background-color: #FFF;
        padding-right: 0;
        padding-left: 0;
        text-align: left;
    }
    .thrColHybHdr #sidebar4 {
        float: right;
        width: 170px; 
        background-color: #FFF;
        padding-right: 0;
        padding-left: 0;
        text-align: left;
    }

    .thrColHybHdr #sidebar1 h3, .thrColHybHdr #sidebar1 p, .thrColHybHdr #sidebar2 p, .thrColHybHdr #sidebar2 h3 {
        margin-left: 10px; 
        margin-right: 10px;
        color: #000;
    }


    .thrColHybHdr #mainContent {
        margin-top: 46px;
        margin-right: 0em;
        margin-left: 12em;
        padding-top: 4px;
        padding-right: 0em;
        padding-bottom: 0;
        padding-left: 0em;

    .thrColHybHdr #mainContent1 {
        margin-top: 60em;
        margin-right: 0em;
        padding-top: 0px;
        padding-right: 0em;
        padding-bottom: 0;
        padding-left: 0em;
        width: 100%;
        text-align: left;

    .thrColHybHdr #footer {
        padding: 0 10px; 
        background:#DDDDDD;
        background-color: #CCC;

    .thrColHybHdr #footer p {
        margin: 0; 
        padding: 10px 0; 
    }

    .fltrt { 
        float: right;
        margin-left: 8px;
    }
    .fltlft { 
        float: left;
        margin-right: 8px;
    }
    .clearfloat { 
        clear:both;
        height:0;
        font-size: 1px;
        line-height: 0px;
    }
    .thrColHybHdr #container #sidebar3 h5 {
        text-align: center;
    }
    .thrColHybHdr #container #sidebar3 table tr th {
        text-align: center;
    }
    .thrColHybHdr #container #mainContent1 {
        text-align: center;
        font-size: 90%;
        margin-top: 2em;
    }
    .thrColHybHdr #container #sidebar1 table tr th {
        color: #000;
    }
    #mainContent1 h5 a {
        font-family: Tahoma;
        font-size: 10px;
        color: #000;
    }

    #container #mainContent p a {
        font-family: Tahoma;
        font-size: 12px;
        color: #000;
    }
    #container #mainContent p a {
        font-family: Tahoma;
        font-size: 12px;
        font-weight: bold;
        color: #000;
    }
    </style>
    <script type="text/javascript">
    function MM_swapImgRestore() { //v3.0
      var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
    }
    function MM_preloadImages() { //v3.0
      var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
        var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    }

    function MM_findObj(n, d) { //v4.01
      var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
        d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
      if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
      for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
      if(!x && d.getElementById) x=d.getElementById(n); return x;
    }

    function MM_swapImage() { //v3.0
      var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
       if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
    }
    </script>
    </head>

    <body class="thrColHybHdr" onload="MM_preloadImages('pictures/dresses/B02b.jpg','pictures/dresses/A01b.jpg','pictures/dresses/B03b.jpg','pictures/logo buttons/w012color.JPG','pictures/logo buttons/header.jpg','pictures/logo buttons/home1.JPG','pictures/logo buttons/products1.JPG','pictures/logo buttons/customize1.JPG','pictures/logo buttons/testimonials1.JPG','pictures/logo buttons/friends1.JPG','pictures/dresses/E02.jpg','pictures/dresses/BK318.jpg','pictures/dresses/BK318b.jpg','pictures/dresses/BK330.jpg')">

    <div id="container">

      <div id="header">

    <script type="text/javascript">
    var k_push_vars = {
        "display_after": 30,
        "view_percentage": 40,
        "popup_font_color": "#000000",
        "popup_background": "#ffffff",
        "popup_separator": "#D4E2F0",
        "header": "Your feedback is important to us!",
        "question": "Would you be willing to give us a short (1 minute) feedback?",
        "footer": "Thank you for helping us improve our website",
        "remind": "Remind me later",
        "remind_font_color": "#3882C3",    
        "yes": "Yes",
        "no": "No",
        "text_direction": "ltr",
        "images_dir": "http://cf.kampyle.com/",
        "yes_background": "#76AC78",
        "no_background": "#8D9B86",
        "site_code": 6231394
    }
    </script>

    <link rel="stylesheet" type="text/css" media="screen" href="http://cf.kampyle.com/k_button.css" />

        <h1 ><a href="index.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image8','','pictures/logo buttons/header.jpg',1)"><img src="pictures/logo buttons/header.jpg" name="Image8" width="780" height="285" border="0" id="Image8" /></a><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image8','','pictures/logo buttons/header.jpg',1)"></a></h1>
        <h1 ><a href="index.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image9','','pictures/logo buttons/home1.JPG',1)"><img src="pictures/logo buttons/home.JPG" name="Image9" width="153" height="61" border="0" id="Image9" /></a><a href="index.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image26','','pictures/logo buttons/w012color.JPG',1)"></a><a href="index.html"></a><a href="choose.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image10','','pictures/logo buttons/products1.JPG',1)"><img src="pictures/logo buttons/products.JPG" name="Image10" width="155" height="61" border="0" id="Image10" /></a><a href="customize.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image11','','pictures/logo buttons/customize1.JPG',1)"><img src="pictures/logo buttons/customize.JPG" name="Image11" width="156" height="61" border="0" id="Image11" /></a><a href="reviews.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image12','','pictures/logo buttons/testimonials1.JPG',1)"><img src="pictures/logo buttons/testimonials.JPG" name="Image12" width="157" height="61" border="0" id="Image12" /></a><a href="friends.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image13','','pictures/logo buttons/friends1.JPG',1)"><img src="pictures/logo buttons/friends.JPG" name="Image13" width="159" height="61" border="0" id="Image13" /></a></h1>
      </div><div id="sidebar1">
        <p><?php echo $toplinks?></p>
        <table width="100%" border="1">
          <tr>
            <th scope="col">What's New?</th>
          </tr>
        </table>
        <h5 align="center"><a href="BK302.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image26','','pictures/dresses/BK302.jpg',0)"><img src="pictures/dresses/BK302.jpg" name="Image26" width="150" height="240" border="0" id="Image26" /></a></h5>
        <table width="100%" border="1">
          <tr>
            <th scope="col">What's Hot?</th>
          </tr>
        </table>
        <h5 align="center"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image27','','pictures/dresses/E02.jpg',1)"><img src="pictures/dresses/E02.jpg" name="Image27" width="150" height="240" border="0" id="Image27" /></a></h5>
        <table width="100%" border="1">
          <tr>
            <th scope="col">This week special</th>
          </tr>
        </table>
        <p align="center"><a href="BK330.php" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image1','','pictures/dresses/BK330.jpg',1)"><img src="pictures/dresses/BK330.jpg" name="Image1" width="150" height="240" border="0" id="Image1" /></a></p>
      </div>
      <div id="mainContent">


    <div id='k_close_button' class='k_float kc_bottom_sl kc_right'></div><div><a href='http://www.kampyle.com/feedback_form/ff-feedback-form.php?site_code=6231394&amp;lang=en&amp;form_id=54960'  target='kampyleWindow' id='kampylink' class='k_float k_bottom_sl k_right' onclick="javascript:k_button.open_ff('site_code=6231394&amp;lang=en&amp;form_id=54960');return false;"><img src="http://cf.kampyle.com/buttons/en/orange/en-orange-corner-low-right.gif" alt="Feedback Form" border="0"/></a></div>
    <div id='k_slogan' class='k_float k_bottom k_right'></div>
    <script src="http://cf.kampyle.com/k_button.js" type="text/javascript"></script>
    <script src="http://cf.kampyle.com/k_push.js" type="text/javascript"></script>

        <div align="center"></div>
    <h5 align="left">
      <p><a href="create_message.php">Create a new message</a></p>
      <p>
        <?php
    if ($username){
        echo 
    "<div id='box'>
          <b class='corners'>
          <b class='corners1'><b></b></b>
          <b class='corners2'><b></b></b>
          <b class='corners3'></b>
          <b class='corners4'></b>
          <b class='corners5'></b></b>
          <div class='cornersfg'>
        </div>
            <div id='bottom' style='padding: 10px;'>"
    ;
        
    ////////////////////////////////////////////////////////////////////
            
    $inboxbtn $_POST['deleteinbox'];
            
    $outboxbtn $_POST['deleteoutbox'];
            
            if (
    $inboxbtn){
                require(
    'connect_to_mysql.php');
                
    $selectall $_POST['selectall'];
                if (
    $selectall){
                    
    $query mysql_query("SELECT * FROM messages WHERE to_user='$username'");
                    while (
    $row mysql_fetch_assoc($query)){
                        
    mysql_query("UPDATE messages SET to_delete='1' WHERE to_user='$username'");
                    }
                    echo 
    "All messages have been deleted. If you did not want this to happen, then please contact us.";
                }
                else{
                    
    $query mysql_query("SELECT * FROM messages WHERE to_user='$username'");
                    while (
    $row mysql_fetch_assoc($query)){
                        
    $msg_id $row['id'];
                        
    $value "cb"."$msg_id";
                        
    $checkbox $_POST[$value];
                        if (
    $checkbox){
                            
    mysql_query("UPDATE messages SET to_delete='1' WHERE id='$msg_id'");
                        }
                    }
                    echo 
    "The selected messages have been deleted. If you did not want this to happen, then please contact a site administrator.";
                }
            }
            elseif (
    $outboxbtn){
                require(
    'connect_to_mysql.php');
                
    $selectall $_POST['selectall'];
                if (
    $selectall){
                    
    $query mysql_query("SELECT * FROM messages WHERE from_user='$username'");
                    while (
    $row mysql_fetch_assoc($query)){
                        
    mysql_query("UPDATE messages SET from_delete='1' WHERE from_user='$username'");
                    }
                    echo 
    "All messages have been deleted. If you did not want this to happen, then please contact a site administrator.";
                }
                else{
                    
    $query mysql_query("SELECT * FROM messages WHERE from_user='$username'");
                    while (
    $row mysql_fetch_assoc($query)){
                        
    $msg_id $row['id'];
                        
    $value "cb"."$msg_id";
                        
    $checkbox $_POST[$value];
                        if (
    $checkbox){
                            
    mysql_query("UPDATE messages SET from_delete='1' WHERE id='$msg_id'");
                        }
                    }
                    echo 
    "The selected messages have been deleted. If you did not want this to happen, then please contact a site administrator.";
                }
            }
            else
                echo 
    "You must click the delete button to view this page.";
            
        
    ////////////////////////////////////////////////////////////////////    
        
    echo "</div>
          </div>
          <b class='corners'>
          <b class='corners5'></b>
          <b class='corners4'></b>
          <b class='corners3'></b>
          <b class='corners2'><b></b></b>
          <b class='corners1'><b></b></b></b>
        </div>"
    ;
        echo 
    "</div>";
    }
    else
        echo 
    "<center><h2><font color='red'>You must be logged in to view this page.</font></h2></center>";
    require(
    'connect_to_mysql.php'); ?>
        </h3>
        
        
      <!-- begin htmlcommentbox.com -->
      </p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p>&nbsp;</p>
      <p><a href="contactus.php">Contact Us</a> <a href="privacy.php">Privacy</a> <a href="sizing.php">Sizing</a> <a href="shippingandreturns.php">Shipping and Returns</a> <a href="aboutus.php">About Us</a> <a target="_blank"href="catalogue.php">Catalogue</a></p>
      <p>© 2010 Triplenines.com a division of 999</p>
      </div>
      <!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats -->
     <br class="clearfloat" />
     <!-- end #container -->
    </div>

    </body>
    </html>

  • #3
    met
    met is offline
    Regular Coder
    Join Date
    Oct 2009
    Location
    United Kingdom
    Posts
    728
    Thanks
    4
    Thanked 119 Times in 119 Posts
    without knowing more, i can speculate that "from_delete" is an integer.

    your code is currently setting the value to a "string" which causes errors

    try this for each DELETE query

    PHP Code:
    mysql_query("UPDATE messages SET to_delete=1 WHERE to_user='$username'") or die('Error...' mysql_error()); 

  • #4
    New Coder
    Join Date
    Aug 2010
    Posts
    36
    Thanks
    8
    Thanked 0 Times in 0 Posts
    that did not work, can you tell me what else you need to know?

    Sorry i'm really back with php

  • #5
    New Coder
    Join Date
    Aug 2010
    Posts
    36
    Thanks
    8
    Thanked 0 Times in 0 Posts
    Use the username test

    and password test

    or create your own thanks

    the create message don't work yet its in another trend

    http://codingforums.com/showthread.p...610#post987610

  • #6
    New Coder
    Join Date
    Aug 2010
    Posts
    36
    Thanks
    8
    Thanked 0 Times in 0 Posts
    username : douboc@ymail.com

    pwd: test


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •