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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:21:58+00:00 2026-05-13T12:21:58+00:00

making a simple movie review site to practice PHP. on one page ( a

  • 0

making a simple movie review site to practice PHP. on one page ( a form) i write a title and review and submit, it then adds the info to mysql. i’m trying to create a page where i can delete reviews i’ve written. i’m going about this by returning all titles into a form tag, where i can select on and then submit that form to a process page and delete the item.

having issues with the WHILE statement and SQL statement.

$conn = mysql_connect($host, $user, $password)
    or die("couldn't make connection");

mysql_select_db('cms', $conn)
    or die("couldn't select database");

$sql = "SELECT * FROM frontPage";

$sql_result = mysql_query($sql, $conn)
    or die("couldn't execute query");

while($row = mysql_fetch_array($sql_result)) {
    $movieTitle = $row['title'];
}


?>






<form method="post" action="deleteReview_process.php">

<select name="title">
    <option><?php echo $movieTitle; ?>
</select>

<input type="submit" name="delete" id="delete" value="delete" />

 </form>
  • 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-13T12:21:58+00:00Added an answer on May 13, 2026 at 12:21 pm

    Try this, the fixes include closing your option tag, and including the option tag inside the MySQL loop so the option tag gets outputted each time there is a new item.

    <?
    $conn = mysql_connect($host, $user, $password)
        or die("couldn't make connection");
    
    mysql_select_db('cms', $conn)
        or die("couldn't select database");
    
    $sql = "SELECT * FROM frontPage";
    
    $sql_result = mysql_query($sql, $conn)
        or die("couldn't execute query");
    ?>
    <form method="post" action="deleteReview_process.php">
    <select name="title">
    <?
    while($row = mysql_fetch_array($sql_result)) {
        $movieTitle = $row['title'];
    ?>
        <option><?php echo $movieTitle; ?></option>
    <?
    
    }
    ?>
    </select>
    <input type="submit" name="delete" id="delete" value="delete" />
    </form>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm making a simple form to create polls, therefore I want the possibility to
I'm making a simple navigation menu for a site. You create an ul with
I am making a simple game in order to learn a new language. I
I'm making a simple 2 player game in XNA and started looking into saving
I'm making a simple scheduler with C# in .Net. All it does is execute
If I'm making a simple grid based game, for example, I might have a
I'm making a simple 2D game for the iPhone. It's based on CrashLanding. so
I'm making a simple tool that will get a string of MySQL commands and
I'm making a simple Image Debugger Visualizer. Code is below. I'm not sure if
I'm making a simple remove link with an onClick event that brings up a

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.