I have a php script that allows a user to insert update and delete records but I have problem with the update feature! When I try to update the record the first five columns populate the fields in the form, I have 13 columns that should fill in all of the form fields, but they don't! I know the full record exists because I have did a query in telnet and the full record is there. Please help, this is really waxing my ass, and trust me it's not fun!!
you can see the page and try if for yourself if you like: http://www.womensmusic.com/test_mysql/edit.php
the following is the update form code
<----Code------>
<?php
if ($composer_id) {
// editing so select a record
$sql = "SELECT * FROM womencomposers WHERE composer_id = $composer_id";
$result = mysql_query($sql);
$myrow = mysql_fetch_array($result);
$composer_id = $myrow["composer_id"];
$fname = $myrow["fname"];
$lname = $myrow["lname"];
$birth_year = $myrow["birth_year"];
$death_year = $myrow["death_year"];
$origin_country = $myrow["origin_country"];
$bio = $myrow["$bio"];
$comments = $myrow["$comments"];
$genre = $myrow["$genre"];
$season_topical = $myrow["$season_topical"];
$show_number = $myrow["$show_number"];
$instrument = $myrow["$instrument"];
$cd_featured_name = $myrow["$cd_featured_name"];
$preformers = $myrow["$preformers"];
// print the composer_id for editing
?>
<input type=hidden name="composer_id" value="<?php echo $composer_id ?>">
<?php
}
?>
First name:<input type="Text" name="fname" value="<?php echo $fname ?>"><br>
Last name:<input type="Text" name="lname" value="<?php echo $lname ?>"><br>
Birth Year:<input type="Text" name="birth_year" value="<?php echo $birth_year ?>"><br>
Death Year:<input type="Text" name="death_year" value="<?php echo $death_year ?>"><br>
Origin Country:<input type="Text" name="origin_country" value="<?php echo $origin_country ?>"><br>
Bio:<input type="Text" name="bio" value="<?php echo $bio ?>"><br>
Comments:<input type="Text" name="comments" value="<?php echo $comments ?>"><br>
Genre:<input type="Text" name="genre" value="<?php echo $genre ?>"><br>
Season/Topical:<input type="Text" name="season_topical" value="<?php echo $season_topical ?>"><br>
Show Number:<input type="Text" name="show_number" value="<?php echo $show_number ?>"><br>
Instrumentation:<input type="Text" name="instrument" value="<?php echo $instrument ?>"><br>
Name of CD Featured On:<input type="Text" name="cd_featured_name" value="<?php echo $cd_featured_name ?>"><br>
Preformers:<input type="Text" name="preformers" value="<?php echo $preformers ?>"><br>
<input type="Submit" name="submit" value="Enter information">
</form>
<?php
}
?>
</-----Code------>
Any help one might have would be very nice!!
Thanks so much,
Justin