Hello;
Here is the setup:
I am trying to populate a form with default field sets loaded with variables from a previous page. I have placed echo statements into my code to verify that the variables are coming accross correctly. The variable are being loaded from a MySql table read. The result is being parsed into the individual variables, echoed out to verify that they are working, then, I am creating a form inside of a table for formatting, and trying to populate the value fields with the variables. Here is the sample of what the results are, followed by the actual code:
Make your CHANGES in the form below:
itsnotmine.mp3
song is about not owning up
yeah
*the above text is the echo out of the variables to prove they are coming thru
This is what is displayed on the form******
itsnotmine.mp3 Song Name
song Song Description
Song Lyrics
Notice there is nothing displayed in the Song Lyrics Text Area, and only
One word displayed in the Song Description Text Box
Here is the code from the page:
<?php
echo 'Make your <B>CHANGES</b> in the form below:<br><br>';
$change = $_SESSION['sedit'];
$query = "SELECT `name` , `description`, `lyrics` FROM `songs` WHERE `name`LIKE '$change' " ;
$result = mysql_query($query);
$songarray = mysql_fetch_array($result, MYSQL_ASSOC);
$changename = $songarray['name'];
$changedesc = $songarray['description'];
$changelyric = $songarray['lyrics'];
echo $changename . '<br>';
echo $changedesc . '<br>';
echo $changelyric . '<br>';
echo '<table width="100%">';
echo '<tr><td><form method="post" action="song_change_update.php"></td></tr>';
echo '<tr><td><input type="text" name="songname" value=' . $changename . '>Song Name</td></tr>';
echo '<tr><td><input type="text" name="songdesc" value='.$changedesc.'>Song Description</td></tr>';
echo '<tr><td><textarea name="songlyrics" rows="20" cols="40" value=' . $changelyric . '></textarea>Song Lyrics</td></tr>';
//echo '<textarea name="" rows="" cols=""></textarea> ';
echo '<tr><td></form></td></tr>';
echo '</table>';
?>
So, I do not understand why the full content of the variables are not being filled into the form fields. Can anyone please help me?
Thank you
Ice