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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T02:19:36+00:00 2026-06-06T02:19:36+00:00

That’s how I’m new in here on the website so it would be super

  • 0

That’s how I’m new in here on the website so it would be super if you’ll tell if I need to do something because I am very new in here ..

What I have problem with my website it’s header and yes a second error that I do not get to go up in some manner whatsoever.

that’s how I’m going to build my own forum since I do not really bother to spend phpbbforum or what it says and. This is how I try lie same html with php code and it works not at all in some way.

i have try so here:

<form action="#" method="post">

        <?php
            if($stmt = $mysqli->prepare("INSERT INTO `forum_traede` (`kategori_id`, `titel`, `bruger_id`, `dato`, `tekst`) VALUES (?, ?, ?, NOW(), ?)"))
            {
                $stmt->bind_param('ssss', $kategori, $titel, $bruger_id, $tekst);
                $kategori = $_POST["kategori"];
                $titel = $_POST["titel"];
                $bruger_id = $_SESSION["user_id"];
                $tekst = $_POST["tekst_2"];

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

                header ('Location: ./bruger-forum');
            }
            else
            {
                echo 'Der opstod en fejl i erklæringen: ' . $mysqli->error;
            }
        ?>
            <table border="0">
                <tr>
                    <td id="tb-w_a"><p>Titel</p></td>
                    <td>:</td>
                    <td><input type="text" name="titel"></td>
                </tr>
                <tr>
                    <td id="tb-w_a"><p>Kategori</p></td>
                    <td>:</td>
                    <td>
                    <select name="kategori">
                    <?php
                    $query = "SELECT id, beskrivelse FROM forum_kategorier";
                    $result = $mysqli->query($query);
                    while(list($id_katogori, $beskrivelse) = $result->fetch_row())
                    {
                        echo "<option value=\"$id_katogori\">$beskrivelse</option>";  
                    }
                    ?>
                    </select>
                    </td>
                </tr>
            </table>
        <textarea name="tekst_2" style="width:500px; height:170px;"></textarea><br />
        <input type="submit" value="Opret indhold" name="godkendt_indhold">
    </form>

but here I did not click the submit button

errors are here

Warning: Cannot modify header information – headers already sent by (output started at /home/jesperbo/public_html/xx.dk/bruger_forum_opretindhold.php:26) in /home/jesperbo/public_html/xx.dk/bruger_forum_opretindhold.php on line 50

I’ve also try to do it this way but there is therefore also error out.

i try here agani 🙂

<form action="http://xxx.dk/bruger-forum-godkendt/" method="post">
            <table border="0">
                <tr>
                    <td id="tb-w_a"><p>Titel</p></td>
                    <td>:</td>
                    <td><input type="text" name="titel"></td>
                </tr>
                <tr>
                    <td id="tb-w_a"><p>Kategori</p></td>
                    <td>:</td>
                    <td>
                    <select name="kategori">
                    <?php
                    $query = "SELECT id, beskrivelse FROM forum_kategorier";
                    $result = $mysqli->query($query);
                    while(list($id_katogori, $beskrivelse) = $result->fetch_row())
                    {
                        echo "<option value=\"$id_katogori\">$beskrivelse</option>";  
                    }
                    ?>
                    </select>
                    </td>
                </tr>
            </table>
        <textarea name="tekst_2" style="width:500px; height:170px;"></textarea><br />
        <input type="submit" value="Opret indhold" name="godkendt_indhold">
    </form>

send infomation on here to

<?php
            if($stmt = $mysqli->prepare("INSERT INTO `forum_traede` (`kategori_id`, `titel`, `bruger_id`, `dato`, `tekst`) VALUES (?, ?, ?, NOW(), ?)"))
            {
                $stmt->bind_param('ssss', $kategori, $titel, $bruger_id, $tekst);
                $kategori = $_POST["kategori"];
                $titel = $_POST["titel"];
                $bruger_id = $_SESSION["user_id"];
                $tekst = $_POST["tekst_2"];

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

                header ('Location: ../bruger-forum');
            }
            else
            {
                echo 'Der opstod en fejl i erklæringen: ' . $mysqli->error;
            }
        ?>

errors here!
Fatal error: Call to a member function prepare() on a non-object in /home/jesperbo/public_html/xxx.dk/bruger_forum_opretindhold_godkendt.php on line 2

and i have try

header ('Location: http://xxx.dk/bruger-forum/');

and

header ('Location: ../bruger-forum');

The first thing I show up to you I want out when it has sent infomation to the database then it should just “jump” back to the forum page .. I build my url up. htaccess

Feel free to ask if there is anything but as I said I come from Denmark and is not exactly the best of English

Thanks for you look!!

  • 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-06T02:19:39+00:00Added an answer on June 6, 2026 at 2:19 am

    the error is that you are triying to set a header after sending some input to the browser.
    if you want to redirect you can either move your code to the begining and send the header('location:...); BEFORE anything.

    or use something like echo "<script>window.location = 'yourURL'</script>"

    and the fatal error, its because your object is not being created.

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

Sidebar

Related Questions

That sounds pretty odd but i have this cod and i need to convert
That's basically it. I have a demo up here . I have been going
That title may need some work. Perhaps after reading this, you may be able
That is to say, let's say I'm writing something that's hosted on foo.com .
That is when you have any jar file attached to you your class path.
That's my header: #ifndef MYCLASSES_H_ #define MYCLASSES_H_ #define ARRAY_SIZE(x) (sizeof((x)) / sizeof((x)[0])) namespace mynamespace
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
That might sound silly but can't do it myself :( Need your help guys.
That's a really awkward title :) I need to write a report that generates
I have a French site that I want to parse, but am running into

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.