Jump to content

confused with an error


Porkie

Recommended Posts

Hi Porkie,

 

Are you able to show us the full code - how are you  performing the MySQL query?

 

From what you've posted you need to remove the value attribute as this can't be set on a textarea, and remove the curly brackets.  So something like:

 

echo"<textarea name='englandsong' cols='80' rows='30' >$stuff['Comp1england']</textarea>";

 

But depending on how you're MySQL query is being performed this may or may not output a result.

Link to comment
Share on other sites

thanks for all replies, that coding works now, however can you see a problem in this update piece of code,

 

<?php 
require('core.inc.php');
if($_SERVER['REQUEST_METHOD'] == 'POST') {
$Comp1England = addslashes($_POST['englandsong']);

         
         $sql = mysql_query("UPDATE gg_users SET 
         
         $Comp1England = '".englandsong."' ");
          
          if ($sql)
          {
             echo "Updated successfully";
          }
          else
          {
             echo "There was an error updating the database";

          }
}

?>

 

 

Link to comment
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.