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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T11:19:38+00:00 2026-06-18T11:19:38+00:00

I recently made a code that updates my posts on my blog. It worked

  • 0

I recently made a code that updates my posts on my blog. It worked perfectly on localhost. But when i uploaded it online it did not work any more. The weird thing is it doesn’t even display a error so i have no idea where to look. Can someone please help me ?

require('config.php');
$query = "SELECT * FROM project ORDER BY idproject DESC";
$result = mysqli_query($verbinding, $query ) or die (mysqli_error('kan geen verbinding maken met de database'));
if(isset($_POST['editBut'])){
    $editTitle = $_POST['editName'];
    $editThis = mysqli_query($verbinding, "SELECT * FROM project WHERE title = '".$editTitle."'");
    $values = mysqli_fetch_assoc($editThis);
}
if(isset($_POST['update'])){
    $editedTitle = $_POST['newTitle'];
    $editedText = $_POST['newTekst'];
    $oldTitle = $_POST['oldTitle'];
    $date = $_POST['datum'];
    $updater = mysqli_query($verbinding, "UPDATE Project SET title='".$editedTitle."', content='".$editedText."' WHERE title='".$oldTitle."' AND datum='".$date."'");
    echo $updater;
    header('location:editPost.php?id=1');
}
if(isset($_GET['id'])){
    echo 'post has been succesfully updated';
}

<?php if(isset($_POST['editBut'])){ ?>
            <form action="" method="post">
                Title: <input type="text" name="newTitle" value="<?php echo $values['title'] ?>"><br>
                Text: <textarea type="text" name="newTekst" id="newTekst"><?php echo $values['content'] ?></textarea><br>
                <input type="hidden" value="<?php echo $values['title'] ?>" name="oldTitle">
                <input type="hidden" value="<?php echo $values['datum'] ?>" name="datum">
                <input type="submit" name="update" value="Edit post">
            </form>
        <?php } else { ?>
            <p>Find the post you want to edit:</p>
            <form action="" method="post">
                <select name="editName">
                    <?php
                    while ($row = mysqli_fetch_assoc($result)) {
                       ?> <option value="<?php echo $row['title'] ?>"><?php echo $row['title'] ?></option>
                    <?php } ?>
                </select>
                <input type="submit" name="editBut" value="Choose">
            </form>
        <?php } ?>
  • 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-18T11:19:39+00:00Added an answer on June 18, 2026 at 11:19 am

    In update query replace your table name with small letter.

    replace Project with project

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

Sidebar

Related Questions

I have recently made changes in some code that makes a char name field
I made a script before, that worked completely fine in PHP 5.2. But when
I code C# all day, but recently made a jump to Java for hobby
I recently made a very simple practice program in Python, that takes user input
I recently made this simple navigation where you have a couple links that have
I recently made this wordpress blog, where you can sign up a team for
I recently made a c# printer management tool that uses a WCF service which
I recently came across some Java code that simply put some strings into a
I don´t know what I did, but just recently the hole view is displaced
I recently made a Google Apps Script that runs onSubmit of a Google form.

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.