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 8755317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T13:50:00+00:00 2026-06-13T13:50:00+00:00

I have next code : which works great on other pages. But not on

  • 0

I have next code :

which works great on other pages. But not on this

<tr><td>Upload Terms and Condition <br />(pdf, doc, docx, xls, txt)</td>
    <td><input type = "file" name = "termspdf" id = "termspdf"/></td>
</tr>

and next code is :

// PDF SECTION ...
if (is_uploaded_file($_FILES['termspdf']['tmp_name'])) {
    $pdf = $_FILES["termspdf"]["name"];
    $pdfSize = $_FILES["termspdf"]["size"];


    if ($_FILES['termspdf']['type'] != "application/pdf") {
        echo $lang['var464'];
    } else {
        $path="images/products/pdf/";
        $newPdf = time().".pdf";
        $newPDFPath=$path.$newPdf;

        $result = move_uploaded_file($_FILES['termspdf']['tmp_name'], $newPDFPath);
        chmod($newPDFPath, 0777);
    }
}




Array
(
)

Notice: Undefined index: termspdf in
/home/user678/public_html/users/_edit.php on line 25

I get any result. What can be wrong?

print "<pre>";
    print_r($_FILES);
    print "</pre>"; 

nothing ..

Thank you

  • 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-06-13T13:50:01+00:00Added an answer on June 13, 2026 at 1:50 pm

    Your form is probably not a multipart form:

    <form enctype="multipart/form-data" action= "<?=BASE_URL?>/user.php?do=edit" method="POST">
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code snippet, which works great somewhere else, but gives me a
I have some jQuery code which works great in Firefox and Chrome, but does
I have created an next and prev image link which works great. But I'd
I have a Next/Previous button on my blog, which works great when you start
I have the a function I took from this post which works great: private
I have the next code: js: $('[id^=check-]').change(function(){ var new_id = this.id.replace(/check/, 'new'), real_id =
I have the code below which I am using to upload files to my
i have done an Accordion style jQuery function which works lovely, but would like
i have the following code which works perfect. Objective: Given a number n, find
I have a Box2D world which works great. I'm using it in a simple

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.