Forums

Unfortunately no one can be told what FluxBB is - you have to see it for yourself.

You are not logged in.

#1 2015-04-16 14:32:07

joel
Member
Registered: 2014-07-04
Posts: 440

php mailbox view. how do i make it look like a thread views

I am working on a script. I am doing it little by little.

in each stages I am learning one or two things.

now. it is the mailbox.

in the mailbox it has a table form. where it contain sender, subject, time stamp, message, etc.

I just hate the table form. instead I want it to be in the thread form like a real mailbox view.

where one has to click on the subject to open the message not the usual fucked up table list.


maybe just like fluxbb topic views.

also I wants auto message in the mailbox. like after registration and in completion of some things?


someone help me to achieve this thanks.

Last edited by joel (2015-04-16 14:37:22)


Warning! be informed and be forewarned. <p>
<?php
I'm not a native English Man. So my comments might contain some grammatical explosive (ELD), missapropreation of words (dinamyt), The use of wrong words (missiles), & mis spelling of words (war drones). Any of the occurrence can cause havoc. So be warned
?>

Offline

#2 2015-04-16 14:44:05

chris98
Member
From: England, United Kingdom
Registered: 2013-05-31
Posts: 1,292
Website

Re: php mailbox view. how do i make it look like a thread views

What have you got so far?

Offline

#3 2015-04-16 16:02:46

joel
Member
Registered: 2014-07-04
Posts: 440

Re: php mailbox view. how do i make it look like a thread views

the mailbox.php has the script for it and that query the database. for message.

it only has three function namely compose mail, inbox and sent box.

the inbox and sent box. are just table.

I want inbox and sent box to be thread.

can you help!?


Warning! be informed and be forewarned. <p>
<?php
I'm not a native English Man. So my comments might contain some grammatical explosive (ELD), missapropreation of words (dinamyt), The use of wrong words (missiles), & mis spelling of words (war drones). Any of the occurrence can cause havoc. So be warned
?>

Offline

#4 2015-04-16 16:15:52

chris98
Member
From: England, United Kingdom
Registered: 2013-05-31
Posts: 1,292
Website

Re: php mailbox view. how do i make it look like a thread views

I'm trying to help. You're not trying to help yourself. Post the code you already have. From what you've said above, it seems like you just want someone to write a script for you.

How are we supposed to help without knowing what you've done?

Offline

#5 2015-04-16 18:06:52

joel
Member
Registered: 2014-07-04
Posts: 440

Re: php mailbox view. how do i make it look like a thread views

OK Chris, I will post the code when I get to the computer. still on mobile phone.


Warning! be informed and be forewarned. <p>
<?php
I'm not a native English Man. So my comments might contain some grammatical explosive (ELD), missapropreation of words (dinamyt), The use of wrong words (missiles), & mis spelling of words (war drones). Any of the occurrence can cause havoc. So be warned
?>

Offline

#6 2015-04-17 18:31:55

joel
Member
Registered: 2014-07-04
Posts: 440

Re: php mailbox view. how do i make it look like a thread views

here is sent box its the same with inbox.

sentbox.php

<?php
session_start();
error_reporting(0);
include("dbconnection.php");

if((!(isset($_SESSION['customerid'])))&&(!(isset($_SESSION['adminid']))))
    header('Location:login.php?error=nologin');

if(isset($_GET["mailid"]))
{
	mysql_query("DELETE FROM mail where mailid='$_GET[mailid]'");
	$recres = "Mail deleted Successfully...";
}
if(isset($_SESSION['adminid']))
$result = mysql_query("SELECT * FROM mail where senderid='$_SESSION[adminid]'");
else if(isset($_SESSION['customerid']))
    $result= mysql_query("SELECT * FROM mail where senderid='$_SESSION[customerid]'");
?>

<?php include'header.php' ?>
<P>
<?php include'accountbody.php' ?>

<div id="toptabmenu">
    <?php if(isset($_SESSION['customerid'])) { ?>
    <ul>

            <li><a href="mailinbox.php">Mails</a></li>
            <li><a href="logout.php">logout</a></li>
    </ul>
    <?php } else if (isset($_SESSION['adminid'])) { ?>
    <ul>

            <li><a href="mailinbox.php">Mail</a></li>
            <li><a href="logout.php">logout</a></li>
    </ul>
    <?php } ?>
    
</div>
</div>

<div id="templatemo_main">
    <div id="sidecon">
        <h2 align="center">Sent Mails</h2>
        <form>
            <?php echo $recres; ?>
         <table width="600" border="1">
    
<?php
		 echo " <tr>";
                echo " <th scope='col' width='45' >Delete</th>";
                echo " <th scope='col'>SENDER</th>";
                echo " <th scope='col'>SUBJECT</th>";
                echo " <th scope='col'>TIME</th>";
                echo " </tr>";
         		while($row = mysql_fetch_array($result))
  				{
    			echo " <tr>";
                echo " <th scope='col'><a href='mailinbox.php?mailid=$row[mailid]'>Delete</a></th>";
                echo " <th scope='col'>$row[senderid]</th>";
                echo " <th scope='col'>$row[subject]</th>";
                echo " <th scope='col'>$row[mdatetime]</th>";
                echo " </tr>";
  				}
?>           
      </table>
       	  </form>
    </div>
    
    <div id="sidebar">
         <h2>Mails</h2>
                
                <ul>
               <li><a href="mailinbox.php"><strong>Inbox</strong></a></li>
                <li><strong><a href="mailcompose.php">Compose</a></strong></li>
                <li><strong><a href="mailsent.php">Sent mail</a></strong>
                </ul>
    </div>
</div>


<?php include'footer.php' ?>
    </div>
</body>
</html>

Warning! be informed and be forewarned. <p>
<?php
I'm not a native English Man. So my comments might contain some grammatical explosive (ELD), missapropreation of words (dinamyt), The use of wrong words (missiles), & mis spelling of words (war drones). Any of the occurrence can cause havoc. So be warned
?>

Offline

#7 2015-04-17 19:59:58

chris98
Member
From: England, United Kingdom
Registered: 2013-05-31
Posts: 1,292
Website

Re: php mailbox view. how do i make it look like a thread views

Ignoring the fact that you're using highly insecure, deprecated MySQL functions which I've previously told you time and time again need to be changed for security, and in fact even gave you a prepared statement tutorial, and you're highly susceptible to SQL Injection because you don't know whether the contents of $_SESSION['adminid'] actually is, what errors do you get?

Also, you're going to be getting some kind of index error or string offset error by not using apostrophes when using an array index. And as I'm positive I've repeated to you, after header() you must use exit or the script continues.

This sounds more and more like "fix my project". I know a site where this topic would have been closed by now as a 'gimme teh codez' topic. If you're not going to start putting effort in on your part, and listening to suggestions given, I really suggest the same thing happen here.

We're volunteers, we choose to help people and people who make helping them intentionally difficult are likely to get little to no help.

Imagine this. You come home from work, worn out after a hard day, come on the forum trying to help people, only to have to squeeze every last detail out about a tiny, basic problem, then to find the person you're helping hasn't even listened to your previous advice that's incredibly important.

That's pretty much the situation you and I are in. It's much easier to ignore such topics and focus on helping people who provide this information, listening to advice given and help us help them.

EDIT: You're also vulnerable to cross site request forgery by your logout system not using additional parameters.

Last edited by chris98 (2015-04-17 20:08:41)

Offline

#8 2015-04-17 20:12:55

joel
Member
Registered: 2014-07-04
Posts: 440

Re: php mailbox view. how do i make it look like a thread views

Chris I am not talking of security at the moment. i am trying to build something first before security. its stage by stage.

mind you I am not getting any error.
it works the only thing is the table. which I would prefer thread. view.

thanks.


Warning! be informed and be forewarned. <p>
<?php
I'm not a native English Man. So my comments might contain some grammatical explosive (ELD), missapropreation of words (dinamyt), The use of wrong words (missiles), & mis spelling of words (war drones). Any of the occurrence can cause havoc. So be warned
?>

Offline

#9 2015-04-18 07:52:35

chris98
Member
From: England, United Kingdom
Registered: 2013-05-31
Posts: 1,292
Website

Re: php mailbox view. how do i make it look like a thread views

So rather than make sure you application runs efficiently and is secured from the #1 vulnerability on the web first time, you'd do the project twice? That's more of a waste of time.

I also hear this kind of thing a lot. "I'm not focusing on security at the moment, I just want to get it working". "I want it working before I secure this". "I know this is insecure, but I want to get it working before I make it secure". Some people are ignorant enough to not even answer those questions.

Do it right first time. We hear this almost every time a new thread gets posted on a different forum. Stop thinking you're a special case. You're joining a long list of way over 100, 000 (easily) vulnerable websites on the internet:

http://m14hackersworld.blogspot.co.uk/2 … sites.html

http://pastebin.com/xd9Vxyn9

Besides all these errors, the thing you want is not even related to PHP which is table formatting. There are a million other things I could be doing right now other than sitting here typing these same message out again and again. I don't know how many times I need to repeat that no one will do your work for you.

I'm tired of fighting with you, it seems you're intentionally making it difficult to help you (or subtly trolling) so I'm unsubscribing from this thread now.

Offline

Board footer

Powered by FluxBB