Jump to content

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


addyking

Recommended Posts

all databases are different. The person who creates them chooses the database name, table names, field names, how the tables will link with each other, etc...

without knowing those names you cannot do the script. post the code that stores files.

<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

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']

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.