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.

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

          }
}

?>

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.