Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6681133
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:33:20+00:00 2026-05-26T04:33:20+00:00

I have a submission script set up where people can submit their details and

  • 0

I have a submission script set up where people can submit their details and upload an attachment. It is all recorded in a database in a table called Submissions with the following fields: fname, lname, snumber and upload.

The upload field is currently the location of the file on the server, for example one entry says uploads/123456.zip (uploads is the directory, 123456.zip is the file name).

I also have a back end administration system where all the submissions are displayed. The code used for that is as follows:

<html>
<head>
<title>Internal Database Listing</title>
<style type="text/css">
/**** Start page styles ****/

body {
    background: #DFA01B;
    font-family: arial, sans-serif;
    font-size: 14px;
    }

#wrap {
    max-width: 900px;
    margin: 30px auto;
    background: #fff;
    border: 4px solid #FFD16F;
    -moz-border-radius: 15px;
    -webkit-border-radius: 15px;
    border-radius: 15px;
    padding: 20px;
        }
table.subs {
text-align: center;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif ;
font-weight: normal;
font-size: 11px;
color: #fff;
width: 800px;
background-color: #666;
border: 0px;
border-collapse: collapse;
border-spacing: 0px;
}

table.subs td 
{background-color: #CCC;
color: #000;
padding: 4px;
text-align: left;
border: 1px #fff solid;}

table.subs td.hed
{background-color: #666;
color: #fff;
padding: 4px;
text-align: left;
border-bottom: 2px #fff solid;
font-size: 12px;
font-weight: bold;}

</style>
</head>
<body>
<?php
$username="dbuser";
$password="dbuserpass";
$database="dbsub";

mysql_connect(localhost,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$query="SELECT * FROM Submissions";
$result=mysql_query($query);

$num=mysql_numrows($result);

mysql_close();
?>
<div id="wrap">
    <div align="left">
        <img src="logo.png" width="208" height="87" />
    </div>
    <div align="center">    
        <h1 style="font-family:arial">Total submissions</h1>
    </div>
<div align="center">
<table class="subs" border="1" cellspacing="1" cellpadding="3">
<tr>
<th><font face="Arial, Helvetica, sans-serif">First name</font></th>
<th><font face="Arial, Helvetica, sans-serif">Last name</font></th>
<th><font face="Arial, Helvetica, sans-serif">Student #</font></th>
<th><font face="Arial, Helvetica, sans-serif">Grade</font></th>
<th><font face="Arial, Helvetica, sans-serif">Submission</font></th>
</tr>
</div>
</div>
<?php
$i=0;
while ($i < $num) {

$f1=mysql_result($result,$i,"fname");
$f2=mysql_result($result,$i,"lname");
$f3=mysql_result($result,$i,"snumber");
$f4=mysql_result($result,$i,"grade");
$f5=mysql_result($result,$i,"upload");
?>

<tr>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f1; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f2; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f3; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f4; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><?php echo $f5; ?></font></td>
</tr>

<?php
$i++;
}
?>
</body>
</html>

This code works perfectly except under the upload field it displays upload/123456.ppt. How do I get it to display http://sitename.com/uploads/123456.ppt AND make it a hyper link to that file?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T04:33:21+00:00Added an answer on May 26, 2026 at 4:33 am

    Simply wrap the output in an <a> tag

    <td><font face="Arial, Helvetica, sans-serif"><a href="http://sitename.com/<?php echo $f5; ?>"><?php echo $f5; ?></a></font></td>

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've set up a basic html/php submission form where people can register for our
I have a submission table that is very simple: userId, submissionGuid I want to
I have table with two columns (startdate & enddate) and I have two submission
I have a form which has a input textbox and submit button. On submission
I have a form which generates an HTML table using a PHP script on
I have a php script which uses the following line to submit a form
I'm trying to make an AJAXy submission and have the resulting partial be inserted
We have the requirement to take a form submission and save some data, then
I have a question here regarding iPhone app submission. I have a free application
I have a User model and a Submission model. Each Submission has a ForeignKey

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.