Jump to content

how to show list of files uploaded by current session user.


addyking

Recommended Posts

show list of files uploaded by current session user to the database. I want to show different users when they log in to the website...they can see a list of old files that they have uploaded. can anyone tell me the code/script to this.....please, ty

Link to comment
Share on other sites

<p>welcome: <?php echo $_SESSION['user_name'];?></p>

    <p>There are <?php echo $totalRows_rs1 ?> records</p>

    <form id="form1" name="form1" method="POST" action="<?php echo $editFormAction; ?>">

      <table width="458" border="1">

        <tr>

          <td width="124">Author Name</td>

          <td width="318"><label for="author"></label>

            <input type="text" name="author" id="author" /></td>

        </tr>

        <tr>

          <td>Title</td>

          <td><label for="title"></label>

            <input type="text" name="title" id="title" /></td>

        </tr>

        <tr>

          <td> </td>

          <td><input type="submit" name="submit" id="submit" value="Submit" /></td>

 

 

This is a table its all in dreamweaver. the Session area is from different table, where user login resides. And the recordset is different table where the data is send and stored to database. Now with that echo totalrows i am able to see all the rows of the table. If there any way where i can see only the rows that a specific user has uploaded so that only he is able to alter it. ty

Link to comment
Share on other sites

Once again: I cannot tell you if you'll need to join two tables or not without seeing your database structure.

 

If your structure is properly built, you might have a table dedicated to file uploads, and in that case all you need is something like:

select `fileId`,`filePath`,`fileDescription` from `uploads` where `userId` = $_SESSION['userId']

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.