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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T13:33:10+00:00 2026-06-05T13:33:10+00:00

I am successfully displaying rows of information from my database on a webpage. I

  • 0

I am successfully displaying rows of information from my database on a webpage. I want to be able to edit that data from a form. For some reason, my link to the form is not passing the data though.

Here is the relevant code that displays the data (including the EDIT link):

<table cellspacing="0" cellpadding="5" border="1" width="560">
<tr style="text-align:center">
<td style="text-align:left ; width:175px">Player Name</td>
<td>Team</td>
<td>Pass Yds</td>
<td>Pass TDs</td>
<td>Int Thrown</td>
<td>Rush Yds</td>
<td>Rush TDs</td>
<td></td>
</tr>
<?php
    $result = mysql_query("SELECT ID, Player, Team, Pass_Yds, Pass_TDs, Int_Thrown, Rush_Yds, Rush_TDs, Total_Fantasy_Pts FROM ff_projections WHERE Position = 'QB' ORDER BY ID;");

    while($row = mysql_fetch_array($result))
    {
    ?>

    <tr style="text-align:center">
    <td style="text-align:left"><? echo $row['Player']; ?></td>
    <td><? echo $row['Team']; ?></td>
    <td><? echo $row['Pass_Yds']; ?></td>
    <td><? echo $row['Pass_TDs']; ?></td>
    <td><? echo $row['Int_Thrown']; ?></td>
    <td><? echo $row['Rush_Yds']; ?></td>
    <td><? echo $row['Rush_TDs']; ?></td>
    <td><a href="edit.php?id=<? echo $row['ID']; ?>">Edit</a></td></tr>
<?php
    }
    ?>
</table>

and here is the code from edit.php:

<?php
// contact to database
$connect = mysql_connect("localhost", "xxx", "xxx") or die ("Error , check your server connection.");
mysql_select_db("xxx");
$ID=$_GET['ID'];

$result = mysql_query("SELECT * FROM ff_projections WHERE ID = '$ID'") or die ("Error in query");
$row=mysql_fetch_array($result);
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>

<form name="edit" method="post" action="confirm.php">
<input name="ID" type="hidden" id="ID" value="<? echo $row['ID']; ?>">
<table width="560" cellspcing="0" cellpadding="5" border="0">
<tr style="text-align:center">
<td style="text-align:left ; width:175px">Player Name</td>
<td>Team</td>
<td>Pass Yds</td>
<td>Pass TDs</td>
<td>Int Thrown</td>
<td>Rush Yds</td>
<td>Rush TDs</td>
<td></td>
</tr>
<tr>
<td><? echo $row['Player']; ?></td>
<td><? echo $row['Team']; ?></td>
<td><input class="edit" name="Pass_Yds" type="text" id="Pass_Yds" value="<? echo $row['Pass_Yds']; ?>"></td>
<td><input class="edit" name="Pass_TDs" type="text" id="Pass_TDs" value="<? echo $row['Pass_TDs']; ?>"></td>
<td><input class="edit" name="Int_Thrown" type="text" id="Int_Thrown" value="<? echo $row['Int_Thrown']; ?>"></td>
<td><input class="edit" name="Rush_Yds" type="text" id="Rush_Yds" value="<? echo $row['Rush_Yds']; ?>"></td>
<td><input class="edit" name="Rush_TDs" type="text" id="Rush_TDs" value="<? echo $row['Rush_TDs']; ?>"></td>
<td><input type="submit" name="Submit" value="Submit"></td>
</tr>
</table>
</form>

</body>
</html>

I know much of this code is deprecated. Once I get this version working, I’ll turn my attention to shoring up the code – using the mysqli API most likely.

In the meantime, any help with this would be most appreciated.

  • 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-05T13:33:12+00:00Added an answer on June 5, 2026 at 1:33 pm

    PHP is case sensitive (most of the time). So

    $ID=$_GET['ID'];
    

    needs to be

    $ID=$_GET['id'];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form that is successfully displaying jquery UI autosuggest responses from a
I have two JSPs where I am displaying some info from database in a
I need help in displaying an image from database. I've read that it's efficient
Currently, I'm displaying image metadata successfully from my database using a datatable with sorting/filtering
I am trying a servlet that puts the data into the database:derbi (that comes
I'm using jqGrid Tree grid for displaying some hierarchical data. I've to implement the
My database for Unicode is successfully working for storing and displaying values. But problem
I have a simple form that takes some fields and adds them to the
The following HTML form successfully utilizes jQuery's form validation, displaying This field is required
I have a database that contains rows with links to each episode in them.

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.