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

  • Home
  • SEARCH
  • 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 7963027
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:30:48+00:00 2026-06-04T05:30:48+00:00

it is such that I must also have build up that it will upload

  • 0

it is such that I must also have build up that it will upload a picture to server, but it appears with the error that makes it not possible to proceed or what to say? hmm

activate.php her

<input type="file" name="file" />

activate_updater.php her

<?php include ("include/database/db.php");
ini_set('display_errors',1);
error_reporting(E_ALL | E_STRICT);
session_start();

        $pb = null;
        include("class.upload.php");
        $handle = new Upload($_FILES['profilbillede']);

        if($handle->uploaded){
                //lidt mere store billeder
                $handle->image_resize = true;
                $handle->image_ratio_y = true;
                $handle->image_x = 220;
                $handle->Process("profil/store");
                    //til profil billede lign..
                    $handle->image_resize = true;
                    $handle->image_ratio_crop = true;
                    $handle->image_y = 75;
                    $handle->image_x = 75;
                    $handle->Process("profil");                
            $pb = $handle->file_dst_name;

                echo 'Billedet: '.$pb.'<br>';
                echo "Dit billede blev upload<br>";
        }else{
                $pb = 'bruger_intet.png';
            }

    if($stmt = $mysqli->prepare('UPDATE `brugere` SET `rank`=2, `katogori`=?, `djnavn`=?, `profilbillede`=?, `profiltekst`=?, `facebook`=?, `pris`=?, `booking`=?, `mobil`=? WHERE `code`=?'))
    {

        $stmt->bind_param('iiiiiiiis', $katogori, $djnavn, $profilbillede, $profiltekst, $facebook, $pris, $booking, $mobil, $g_code);
        //fra input ting ting..
        $katogori = $_POST["kategori"];
        $djnavn = $_POST["djnavn"];
        $profilbillede = $_POST["file"];
        $profiltekst = $_POST["profiltekst"];
        $facebook = $_POST["facebook"];
        $pris = $_POST["pris"];
        $booking = $_POST["booking"];
        $mobil = $_POST["mobil"];
        $g_code = $_SESSION["code"];

        $stmt->execute();
        $stmt->close();

        header("Location: http://.....dk/logind/");

    }
    else
    {
        echo 'Der opstod en fejl i erklæringen: ' . $mysqli->error;
    }
?>

so here comes the error here?

Notice: Undefined index: file in /home/jesperbo/public_html/,,,.dk/activate_updater.php on line 37

Warning: Cannot modify header information – headers already sent by (output started at /home/jesperbo/public_html/,,,.dk/activate_updater.php:24) in /home/jesperbo/public_html/,,.dk/activate_updater.php on line 48

here comes the problem

$profilbillede = $_POST["file"];

and here

echo 'Billedet: '.$pb.'<br>';

and here

header("Location: http://....dk/logind/");
  • 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-04T05:30:49+00:00Added an answer on June 4, 2026 at 5:30 am

    Like the error message says, you can’t send headers after you output text.

    header('....')
    

    has to come before any echo commands.

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

Sidebar

Related Questions

(This is not exactly the problem that I have, but it's isomorphic, and I
Say I want to define that an URI such as: myapp://path/to/what/i/want?d=This%20is%20a%20test must be handled
My scenario is such that I have a VB.NET project in SVN and I
I have MySQL running such that I can open a client command line and
Why was java defined such that methods may take as input multiple parameters, but
I have a query such that I need to get A specific dog All
I have a problem such that i have zip files uploaded from forms and
I have class A such that: class A { static int i; A(); f1();
I have a requirement such that my program is suppose to run for a
I have a file that require()'s a namespace, as such: <?php require_once('Beer.php'); // This

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.