franknu Posted April 2, 2007 Share Posted April 2, 2007 i having problem updating a text area. My problem is that all the text area show up in the value space my type text work fine like that here is the text area echo" <TEXTAREA ROWS=5 COLS=65 NAME='Categories' value=('$_POST[Categories]')> $Categories </TEXTAREA>"; here is my display inside text area for Categories </tr><tr> <td>Slogan</td></tr><tr><td> <input type=\'text\' name=\'Slogan2\' value=(\'Customs Full color Printing, D\')> </td> </tr> <tr> <td> Description </td> </tr> <tr> <td> <TEXTAREA ROWS=5 COLS=65 NAME=\'Description1\' value=(\'Number one In full color printing and offset and digital <br> Weather you are looking to create one color job or a full color job<br> We have the expertise, knowledge and technology<br> to help you on time and quality and on budget \')>Number one In full color printing and offset and digital <br> Weather you are looking to create one color job or a full color job<br> We hjhhave the expertise, knowledge and technology<br> to help you on time and quality and on budget ')> Printing business cards fliers graphic design web design software design data storage php programming database design security cameras Quote Link to comment https://forums.phpfreaks.com/topic/45286-problem-updating/ Share on other sites More sharing options...
trq Posted April 2, 2007 Share Posted April 2, 2007 There is no value attribute to a textarea. <textarea name="foo">data goes here</textarea> Quote Link to comment https://forums.phpfreaks.com/topic/45286-problem-updating/#findComment-219889 Share on other sites More sharing options...
franknu Posted April 2, 2007 Author Share Posted April 2, 2007 so it will be like this echo" <TEXTAREA ROWS=5 COLS=65 NAME='Categories' value='categories')> $_POST['Categories']' </TEXTAREA>"; please help Quote Link to comment https://forums.phpfreaks.com/topic/45286-problem-updating/#findComment-219928 Share on other sites More sharing options...
kenrbnsn Posted April 2, 2007 Share Posted April 2, 2007 There is no "value" attribute for the "<textarea>" tag. <?php echo '<textarea ROWS=5 COLS=65 NAME="Categories">' . $_POST['Catagories'] . '</textarea>';\ ?> BTW, it's very important to learn all of HTML before attempting to use PHP to write it. Ken Quote Link to comment https://forums.phpfreaks.com/topic/45286-problem-updating/#findComment-219929 Share on other sites More sharing options...
franknu Posted April 2, 2007 Author Share Posted April 2, 2007 well, it looks good that way the only problem is that it is not holdind the values when i hit update, it is deleting everyting in side the box any idea why Quote Link to comment https://forums.phpfreaks.com/topic/45286-problem-updating/#findComment-219936 Share on other sites More sharing options...
kenrbnsn Posted April 2, 2007 Share Posted April 2, 2007 Please post more of your code between tags. Ken Quote Link to comment https://forums.phpfreaks.com/topic/45286-problem-updating/#findComment-219940 Share on other sites More sharing options...
franknu Posted April 2, 2007 Author Share Posted April 2, 2007 here is most of the code what i think that it is relevant <?php $sql = "SELECT * FROM business_info WHERE BusinessName = '$BusinessName' AND User_Name = '$User_Name'"; $result = mysql_query($query) or die ("Problem with the query: <pre>$sql</pre><br>" . mysql_error()); $res2 = mysql_fetch_assoc($result); if(isset($_POST["submit"])) { $query="UPDATE business_info SET BusinessName= ('$_POST[businessName]'), `Slogan`=('$_POST[$Slogan]'), Business_Address = ('$_POST[business_Address]'), Tel=('$_POST[Tel]'), Website= ('$_POST[Website]'), Email = ('$_POST[Email]'), Fax= ('$_POST[Fax]'), `type`='$type', make = '$make', Categories = ('$_POST[Categories]'), Keyword = ('$_POST[Keyword]'), Picture1 = ('$_POST[Picture1]'), Headline = ('$_POST[Headline]'), Slogan2 = ('$_POST[slogan2]'), Description1 = ('$_POST[Description1]'), Description2 = ('$POST[Description2]'), Description3 = ('$_POST[Description3]'), Picture2 = ('$_POST[Picture2]'), Picture3 = ('$_POST[Picture3]'), `Password`= '$Password' WHERE User_Name = '$User_Name'"; $result = mysql_query($query) or die ("Problem with the query: <pre>$query</pre><br>" . mysql_error()); } echo"<table bgcolor='ffffff'>"; echo"<tr><td> <table><tr> </tr> </table> </td></tr><tr><td></td> </tr><tr><td> <table> <tr> <td><table bgcolor='ffffff'> <tr> <td> <table> "; //208 echo '<form action="'. $_SERVER['PHP_SELF'].'" method="post"enctype="multipart/form-data">'; echo"<tr>"; echo"<td> Busiess Info </td></tr><tr> <td> <table> <tr> <td> Business Name </td> <td>"; echo"<input type='text' name='BusinessName' Value=('$_POST[businessName]'> </td> </tr> <tr> <td> Slogan </td> <td>"; echo"<input type='text' NAME='Slogan' value=('$_POST[slogan]'>"; echo"</td> <td> Website </td> <td> <input type='text' name='Website' value='$Website'> </td>"; echo"</tr> <tr> <td> Tel </td> <td>"; echo"<input type='text' name='Tel' value='$Tel'>"; echo"</td>"; echo"<td> Key Words </td> <td>"; echo"<input type='text' name='Keyword' value='$Keyword'>"; echo"</td> </tr> <tr> <td> Fax </td> <td>"; echo"<input type='text' name='Fax' value='$fax'>"; echo"</td> <td> Address </td> <td>"; echo" <input type='text' name='Business_Address' value='$Business_Address'>"; echo"</td> </tr> </table> </td> </tr> <tr> <td> <table> <tr> <td> </td> <td> </td> <td></td><td> </td><td> Category </td> <td>"; echo '<textarea ROWS=5 COLS=65 NAME="Categories">' . $_POST['Catagories'] . '</textarea>'; echo" </td> </tr> </table> <table> <tr> <td> Business Webpage </td> </tr> <tr> <td> Headline </td> </tr> <tr> <td>"; echo" <input type='text' name='Headline' value=('$_POST[Headline]')>"; echo" </td>"; echo" </tr>"; echo"<tr>"; echo" <td>"; echo"Slogan"; echo"</td>"; echo"</tr>"; echo"<tr>"; echo"<td> <input type='text' name='Slogan2' value=('$_POST[slogan2]')>" ; echo" </td> </tr> <tr> <td> Description </td> </tr> <tr> <td>"; echo" <TEXTAREA ROWS=5 COLS=65 NAME='Description1' value=('$_POST[Description1]')>$Description1 </TEXTAREA> "; echo"</td> </tr> <tr> <td> Description2 </td> </tr> <tr> <td>"; echo"<TEXTAREA ROWS=5 COLS=65 NAME='Description2' value='$Description2'>$Description2</TEXTAREA>"; echo"</td> </tr> <tr> <td> Description3 </td> </tr> <tr> <td>"; echo"<TEXTAREA ROWS=5 COLS=65 NAME='Description3' value='$Description3'>$Description3</TEXTAREA>"; echo"</td> </tr> <tr> <td> <table>"; echo"<table>"; echo"<tr> <td>"; echo" Picture1"; echo" <input name='Picture1' type='file' value=''></td> <td> <img src='dfdfd.jpg'></td>"; echo"</tr>"; echo"<tr> <td>"; echo" Picture2"; echo" <input name='Picture2' type='file' value=''></td> <td> <img src='dfdfd.jpg'></td>"; echo"</tr>"; echo"<tr> <td>"; echo" Picture3"; echo" <input name='Picture3' type='file' value=''></td> <td> <img src='dfdfd.jpg'></td>"; echo"</tr>"; echo"<tr> <td>"; echo" Picture4"; echo" <input name='Picture4' type='file' value=''></td> <td> <img src='dfdfd.jpg'></td>"; echo"</tr>"; echo"<tr> <td>"; echo" Picture5"; echo" <input name='Picture5' type='file' value=''></td> <td> <img src='dfdfd.jpg'></td>"; echo"</tr>"; echo"<tr> <td>"; echo" Picture6"; echo" <input name='Picture6' type='file' value=''></td> <td> <img src='dfdfd.jpg'></td>"; echo"</tr>"; echo"<tr> <td>"; echo" Video"; echo" <input name='video' type='file' value=''></td> <td> <img src='dfdfd.jpg'></td>"; echo"</tr>"; echo"<tr> <td>"; echo"Sound"; echo" <input name='sound' type='file' value=''></td> <td> <img src='dfdfd.jpg'></td>"; Quote Link to comment https://forums.phpfreaks.com/topic/45286-problem-updating/#findComment-219947 Share on other sites More sharing options...
kenrbnsn Posted April 2, 2007 Share Posted April 2, 2007 Please edit your post and put the tag before your code and the tag after it. This will make your code much easier to read. Ken Quote Link to comment https://forums.phpfreaks.com/topic/45286-problem-updating/#findComment-219955 Share on other sites More sharing options...
franknu Posted April 2, 2007 Author Share Posted April 2, 2007 i did it that way i dont know why i came up like that Quote Link to comment https://forums.phpfreaks.com/topic/45286-problem-updating/#findComment-219961 Share on other sites More sharing options...
kenrbnsn Posted April 2, 2007 Share Posted April 2, 2007 No, you used tags, which are different. I edited your post to put in the correct tags. Ken Quote Link to comment https://forums.phpfreaks.com/topic/45286-problem-updating/#findComment-219964 Share on other sites More sharing options...
franknu Posted April 2, 2007 Author Share Posted April 2, 2007 sorry for incovenience Quote Link to comment https://forums.phpfreaks.com/topic/45286-problem-updating/#findComment-219980 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.