Jump to content

Recommended Posts

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 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/45286-problem-updating/
Share on other sites

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

Link to comment
https://forums.phpfreaks.com/topic/45286-problem-updating/#findComment-219929
Share on other sites

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>";

Link to comment
https://forums.phpfreaks.com/topic/45286-problem-updating/#findComment-219947
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.