Jump to content

[SOLVED] will someone help me?


xcoderx

Recommended Posts

someone please help me remove the login fields from here so that it could be accessed without haveing to enter any userid or password please. i have givin many many tries but i end up geting error.

 

<?
include("db.php");

$UserName = "";
$PassWord = "";
$isLogged = true;

if(isset($HTTP_COOKIE_VARS["UserName"]) &&
   isset($HTTP_COOKIE_VARS["PassWord"]))
        {
        $UserName = $HTTP_COOKIE_VARS["UserName"];
        $PassWord = $HTTP_COOKIE_VARS["PassWord"];
        }
         
if(mysql_connect($db_host, $UserName, $PassWord) === false ||
  ($UserName == "" || $PassWord == ""))
  $isLogged = false;
else
  mysql_select_db($db_name);  

$item_id = $HTTP_POST_VARS["id"];
//$item_id gets used as a flag for when a new item is created.
if($item_id != "" && $isLogged == true)
  {
  $name = $HTTP_POST_VARS["name"];
  $price = $HTTP_POST_VARS["price"];
  $summary = $HTTP_POST_VARS["summary"];
  $description = $HTTP_POST_VARS["description"];  
  $ordre = $HTTP_POST_VARS["ordre"];
  if($ordre == "")
     $ordre = "0";
  
  $update = "update items set ordre = ordre + 1 where ordre >= " . $ordre;
  mysql_query($update);
  
  $insert = "insert into items (name, price, summary, description, ordre) values (" .
            "'" . $name . "', " .
            $price . ", " .
            "'" . $summary . "', " .
            "'" . $description . "', " .
            $ordre . ")";
              
  mysql_query($insert);  
            
  $item_id = mysql_insert_id();
  
  if(isset($HTTP_POST_FILES))                
    {
    if(is_uploaded_file($HTTP_POST_FILES["thumbnail"]["tmp_name"]))
      {
      $file_handle = fopen($HTTP_POST_FILES["thumbnail"]["tmp_name"], "rb");
      $thumbnail = $HTTP_POST_FILES["thumbnail"]["name"];
      $file_bytes = addslashes(fread($file_handle, 
                                     filesize($HTTP_POST_FILES["thumbnail"]["tmp_name"])));
                                          
      $update = "update items set " .
                "thumbnail = '" . $file_bytes . "' " .                     
                "where id = " . $item_id;
      mysql_query($update);
                     
      unlink($HTTP_POST_FILES["thumbnail"]["tmp_name"]);
      }
           
    if(is_uploaded_file($HTTP_POST_FILES["image"]["tmp_name"]))
      {
      $file_handle = fopen($HTTP_POST_FILES["image"]["tmp_name"], "rb");
      $image = $HTTP_POST_FILES["image"]["name"];
      $file_bytes = addslashes(fread($file_handle, 
                                     filesize($HTTP_POST_FILES["image"]["tmp_name"])));
                                          
      $update = "update items set " .
                "image = '" . $file_bytes . "' " .                     
                "where id = " . $item_id;
      mysql_query($update);
                                          
      unlink($HTTP_POST_FILES["image"]["tmp_name"]);
      }
    }
  }

$select = "select id from items order by ordre";
$ids = mysql_query($select);
while(($id = mysql_fetch_assoc($ids)) && $isLogged == true)
     {     
     $item_id = $HTTP_POST_VARS["id_" . $id["id"]];
     //If the item was modified, save it.
     if($item_id != "" && $item_id > 0)
       {
       $name = $HTTP_POST_VARS["name_" . $id["id"]];
       $price = $HTTP_POST_VARS["price_" . $id["id"]];
       $summary = $HTTP_POST_VARS["summary_" . $id["id"]];
       $description = $HTTP_POST_VARS["description_" . $id["id"]];       
       $ordre = $HTTP_POST_VARS["ordre_" . $id["id"]];
       
       $update = "update items set " .
                 "name = '" . $name . "', " .
                 "price = " . $price . ", " .
                 "summary = '" . $summary . "', " .
                 "description = '" . $description . "', " .
                 "ordre = " . $ordre . " " .
                 "where id = " . $item_id;
                 
       mysql_query($update);
         
       //Were any files uploaded?        
       if(isset($HTTP_POST_FILES))                
         {         
         if(is_uploaded_file($HTTP_POST_FILES["thumbnail_" . $item_id]["tmp_name"]))
           {           
           $file_handle = fopen($HTTP_POST_FILES["thumbnail_" . $item_id]["tmp_name"], "rb");
           $thumbnail = $HTTP_POST_FILES["thumbnail_" . $item_id]["name"];
           $file_bytes = addslashes(fread($file_handle, 
                                          filesize($HTTP_POST_FILES["thumbnail_" . $item_id]["tmp_name"])));
                                          
           $update = "update items set " .
                     "thumbnail = '" . $file_bytes . "' " .                     
                     "where id = " . $item_id;
           mysql_query($update);
                     
           unlink($HTTP_POST_FILES["thumbnail_" . $item_id]["tmp_name"]);
           }
           
         if(is_uploaded_file($HTTP_POST_FILES["image_" . $item_id]["tmp_name"]))
           {
           $file_handle = fopen($HTTP_POST_FILES["image_" . $item_id]["tmp_name"], "rb");
           $image = $HTTP_POST_FILES["image_" . $item_id]["name"];
           $file_bytes = addslashes(fread($file_handle, 
                                          filesize($HTTP_POST_FILES["image_" . $item_id]["tmp_name"])));
                                          
           $update = "update items set " .
                     "image = '" . $file_bytes . "' " .                     
                     "where id = " . $item_id;
           mysql_query($update);
                                          
           unlink($HTTP_POST_FILES["image_" . $item_id]["tmp_name"]);
           }
         }
       }
       
     //Delete items.
     if($item_id != "" && $item_id < 0)
       {
       $delete = "delete from items where id = " . (-$item_id);
       
       mysql_query($delete);
       
       unlink("./images/item_" . (-$item_id) . "_thumbnail.jpg");
       unlink("./images/item_" . (-$item_id) . "_image.jpg");
       }
     }

$select = "select * from items order by ordre";
$items = mysql_query($select);
?>
<html>

<head>
<title>item shopping cart edit</title>

<script>
function NewImage(id)
         {
         var File;
         var Image;
         var Save;
         
         if(id != null)
           {
           eval('File = document.cart.image_' + id + ';');
           eval('Image = document.images.image_file_' + id + ';');
           }
         else
           {
           File = document.cart.image;
           Image = document.images.image_file;
           }

         if(File.value != '')
           {
           Image.src = File.value;
           save_item(id);
           }
         }

function NewThumb(id)
         {
         var File;
         var Image;
         var Save;
         
         if(id != null)
           {
           eval('File = document.cart.thumbnail_' + id + ';');
           eval('Image = document.images.thumbnail_file_' + id + ';');
           }
         else
           {
           File = document.cart.thumbnail;
           Image = document.images.thumbnail_file;
           }

         if(File.value != '')
           {
           Image.src = File.value;
           save_item(id);
           }
         }
         
function save_item(id)
         {
         if(id != null)
            eval('document.cart.id_' + id + '.value = ' + id + ';');
         else
            document.cart.id.value = 0;
         }
         
function delete_item(id)
         {         
         eval('document.cart.id_' + id + '.value = ' + (-id) + ';');   
         document.cart.submit();      
         }
         
function logout()
         {
         document.cookie = 'UserName=';
         document.cookie = 'PassWord=';
         
         document.cart.submit();
         }
</script>
</head>

<body <? if($HTTP_POST_VARS["id"] != "") { ?>onload="document.cart.ordre.value = ''; document.cart.submit();"<? } ?>>
<form enctype="multipart/form-data" method="post" name="cart">
<input type="hidden" name="ordre" value="<?= $HTTP_POST_VARS["ordre"] ?>" />

<table align="center">

<? if((mysql_num_rows($items) == 0 || $HTTP_POST_VARS["ordre"] != "") 
      && $HTTP_POST_VARS["id"] == "" && $isLogged == true) { ?>

<input type="hidden" name="id" />

<tr>
<td valign="top">
    <table>
    <tr>
    <td>item name: </td>
    <td><input type="text" name="name" onchange="save_item();" /></td>
    </tr>
    
    <tr>
    <td>price: </td>
    <td><input type="text" name="price" onchange="save_item();" /></td>
    </tr>
    
    <tr>
    <td>summary: </td>
    <td><textarea name="summary" onchange="save_item();"></textarea></td>
    </tr>
    
    <tr>
    <td>description: </td>
    <td><textarea name="description" onchange="save_item();"></textarea></td>        
    </td>
    </tr>
            
    <tr>
    <td>
    <input type="button" value="save" 
           onclick="document.cart.submit();"/>
                    
      
    <input type="button" value="cancel" 
           onclick="document.cart.ordre.value = '';
                    document.cart.id.value = '';
                    document.cart.submit();"/>
                    
                         
    <input type="button" value="log out" 
           onclick="logout();" />
    
    <br /><br /></td>        
    </tr>
    </table>
</td>

<td align="right" valign="top" nowrap>
thumbnail: <input type="file" name="thumbnail" onchange="NewThumb();" />
<br />
<img name="thumbnail_file" />
<br />
image: <input type="file" name="image" onchange="NewImage();" />
<br />
<img name="image_file" />
</td>
</tr>

<? } ?>

<? 
while(($item = mysql_fetch_assoc($items)) && ($HTTP_POST_VARS["id"] == null) && ($isLogged == true)) { 

$item_id = $item["id"];
$name = $item["name"];
$price = $item["price"];
$summary = $item["summary"];
$description = $item["description"];
$thumbnail = $item["thumbnail"];
$image = $item["image"];
$ordre = $item["ordre"];

if(is_dir("images/") == false)
   mkdir("images/", 0755);

$thumbnail_file = "images/item_" . $item_id . "_thumbnail.jpg";
if($thumbnail != "")
  {
  $thumbnail_file_handle = fopen("./" . $thumbnail_file, "wb");
  fwrite($thumbnail_file_handle, $thumbnail, strlen($thumbnail));
  chmod("./" . $thumbnail_file, 0644);
  }

$image_file = "images/item_" . $item_id . "_image.jpg";
if($image != "")
  {  
  $image_file_handle = fopen("./" . $image_file, "wb");
  fwrite($image_file_handle, $image, strlen($image));
  chmod("./" . $image_file, 0644);
  }
?>

<input type="hidden" name="id_<?= $item_id ?>" />

<tr>
<td valign="top">
    <table>
    <tr>
    <td>item name: </td>
    <td><input type="text" name="name_<?= $item_id ?>" value="<?= $name ?>" 
               onchange="save_item(<?= $item_id ?>);" /></td>
    </tr>
    
    <tr>
    <td>price: </td>
    <td><input type="text" name="price_<?= $item_id ?>" value="<?= $price ?>" 
               onchange="save_item(<?= $item_id ?>);" /></td>
    </tr>
    
    <tr>
    <td>summary: </td>
    <td><textarea name="summary_<?= $item_id ?>" 
                  onchange="save_item(<?= $item_id ?>);"><?= $summary  ?></textarea></td>
    </tr>
    
    <tr>
    <td>description: </td>
    <td><textarea name="description_<?= $item_id ?>" 
                  onchange="save_item(<?= $item_id ?>);"><?= $description  ?></textarea></td>
    </tr>
    
    <tr>
    <td>order: </td>
    <td><input type="text" name="ordre_<?= $item_id ?>" value="<?= $ordre ?>"
               onchange="save_item(<?= $item_id ?>);" /></td>
    </tr>
    
    <tr>
    <td>
    <input type="button" value="add a new item" 
           onclick="document.cart.ordre.value = <?= $ordre + 1 ?>;
                    document.cart.submit();"/>
     
                         
    <input type="submit" value="save" />
    
                         
    <input type="button" value="delete" 
           onclick="delete_item(<?= $item_id ?>);" />
           
                         
    <input type="button" value="log out" 
           onclick="logout();" />
    
    <br /><br />
    </td>
    </tr>
    </table>
</td>

<td align="right" valign="top" nowrap>
thumbnail: <input type="file" name="thumbnail_<?= $item_id ?>" onchange="NewThumb(<?= $item_id ?>);" />
<br />
<img name="thumbnail_file_<?= $item_id ?>" src="<?= $thumbnail_file ?>" />
<br />
image: <input type="file" name="image_<?= $item_id ?>" onchange="NewImage(<?= $item_id ?>);" />
<br />
<img name="image_file_<?= $item_id ?>" src="<?= $image_file ?>" />
<br />
</td>
</tr>

<? } ?>

<? if($isLogged == false) { ?>
<tr>
<td>User Name </td>
<td><input type="text" name="User" /></td>
</tr>

<tr>
<td>Password</td>
<td><input type="password" name="Pass" /></td>
</tr>

<tr>
<td colspan="2" align="right">
<input type="button" value="log in"
       onclick="document.cookie = 'UserName=' + document.cart.User.value;
                document.cookie = 'PassWord=' + document.cart.Pass.value;
                document.cart.submit();">
</td>
</tr>
<? } ?>

</table>
</form>
</body>
</html>

Link to comment
Share on other sites

try this dont forget to fill in the mysql details

<?
include("db.php");
         
if(mysql_connect($db_host, $DBUSERNAME, $DBPASSWORD) === false)
  $connected = false;
else
  mysql_select_db($db_name);  

$item_id = $_POST["id"];
//$item_id gets used as a flag for when a new item is created.
if($item_id != "" && $connected == true)
  {
  $name = $_POST["name"];
  $price = $_POST["price"];
  $summary = $_POST["summary"];
  $description = $_POST["description"];  
  $ordre = $_POST["ordre"];
  if($ordre == "")
     $ordre = "0";
  
  $update = "update items set ordre = ordre + 1 where ordre >= " . $ordre;
  mysql_query($update);
  
  $insert = "insert into items (name, price, summary, description, ordre) values (" .
            "'" . $name . "', " .
            $price . ", " .
            "'" . $summary . "', " .
            "'" . $description . "', " .
            $ordre . ")";
              
  mysql_query($insert);  
            
  $item_id = mysql_insert_id();
  
  if(isset($_FILE))                
    {
    if(is_uploaded_file($_FILE["thumbnail"]["tmp_name"]))
      {
      $file_handle = fopen($_FILE["thumbnail"]["tmp_name"], "rb");
      $thumbnail = $_FILE["thumbnail"]["name"];
      $file_bytes = addslashes(fread($file_handle, 
                                     filesize($_FILE["thumbnail"]["tmp_name"])));
                                          
      $update = "update items set " .
                "thumbnail = '" . $file_bytes . "' " .                     
                "where id = " . $item_id;
      mysql_query($update);
                     
      unlink($_FILE["thumbnail"]["tmp_name"]);
      }
           
    if(is_uploaded_file($_FILE["image"]["tmp_name"]))
      {
      $file_handle = fopen($_FILE["image"]["tmp_name"], "rb");
      $image = $_FILE["image"]["name"];
      $file_bytes = addslashes(fread($file_handle, 
                                     filesize($_FILE["image"]["tmp_name"])));
                                          
      $update = "update items set " .
                "image = '" . $file_bytes . "' " .                     
                "where id = " . $item_id;
      mysql_query($update);
                                          
      unlink($_FILE["image"]["tmp_name"]);
      }
    }
  }

$select = "select id from items order by ordre";
$ids = mysql_query($select);
while(($id = mysql_fetch_assoc($ids)) && $connected == true)
     {     
     $item_id = $_POST["id_" . $id["id"]];
     //If the item was modified, save it.
     if($item_id != "" && $item_id > 0)
       {
       $name = $_POST["name_" . $id["id"]];
       $price = $_POST["price_" . $id["id"]];
       $summary = $_POST["summary_" . $id["id"]];
       $description = $_POST["description_" . $id["id"]];       
       $ordre = $_POST["ordre_" . $id["id"]];
       
       $update = "update items set " .
                 "name = '" . $name . "', " .
                 "price = " . $price . ", " .
                 "summary = '" . $summary . "', " .
                 "description = '" . $description . "', " .
                 "ordre = " . $ordre . " " .
                 "where id = " . $item_id;
                 
       mysql_query($update);
         
       //Were any files uploaded?        
       if(isset($_FILE))                
         {         
         if(is_uploaded_file($_FILE["thumbnail_" . $item_id]["tmp_name"]))
           {           
           $file_handle = fopen($_FILE["thumbnail_" . $item_id]["tmp_name"], "rb");
           $thumbnail = $_FILE["thumbnail_" . $item_id]["name"];
           $file_bytes = addslashes(fread($file_handle, 
                                          filesize($_FILE["thumbnail_" . $item_id]["tmp_name"])));
                                          
           $update = "update items set " .
                     "thumbnail = '" . $file_bytes . "' " .                     
                     "where id = " . $item_id;
           mysql_query($update);
                     
           unlink($_FILE["thumbnail_" . $item_id]["tmp_name"]);
           }
           
         if(is_uploaded_file($_FILE["image_" . $item_id]["tmp_name"]))
           {
           $file_handle = fopen($_FILE["image_" . $item_id]["tmp_name"], "rb");
           $image = $_FILE["image_" . $item_id]["name"];
           $file_bytes = addslashes(fread($file_handle, 
                                          filesize($_FILE["image_" . $item_id]["tmp_name"])));
                                          
           $update = "update items set " .
                     "image = '" . $file_bytes . "' " .                     
                     "where id = " . $item_id;
           mysql_query($update);
                                          
           unlink($_FILE["image_" . $item_id]["tmp_name"]);
           }
         }
       }
       
     //Delete items.
     if($item_id != "" && $item_id < 0)
       {
       $delete = "delete from items where id = " . (-$item_id);
       
       mysql_query($delete);
       
       unlink("./images/item_" . (-$item_id) . "_thumbnail.jpg");
       unlink("./images/item_" . (-$item_id) . "_image.jpg");
       }
     }

$select = "select * from items order by ordre";
$items = mysql_query($select);
?>
<html>

<head>
<title>item shopping cart edit</title>

<script>
function NewImage(id)
         {
         var File;
         var Image;
         var Save;
         
         if(id != null)
           {
           eval('File = document.cart.image_' + id + ';');
           eval('Image = document.images.image_file_' + id + ';');
           }
         else
           {
           File = document.cart.image;
           Image = document.images.image_file;
           }

         if(File.value != '')
           {
           Image.src = File.value;
           save_item(id);
           }
         }

function NewThumb(id)
         {
         var File;
         var Image;
         var Save;
         
         if(id != null)
           {
           eval('File = document.cart.thumbnail_' + id + ';');
           eval('Image = document.images.thumbnail_file_' + id + ';');
           }
         else
           {
           File = document.cart.thumbnail;
           Image = document.images.thumbnail_file;
           }

         if(File.value != '')
           {
           Image.src = File.value;
           save_item(id);
           }
         }
         
function save_item(id)
         {
         if(id != null)
            eval('document.cart.id_' + id + '.value = ' + id + ';');
         else
            document.cart.id.value = 0;
         }
         
function delete_item(id)
         {         
         eval('document.cart.id_' + id + '.value = ' + (-id) + ';');   
         document.cart.submit();      
         }
         
function logout()
         {
         document.cookie = 'UserName=';
         document.cookie = 'PassWord=';
         
         document.cart.submit();
         }
</script>
</head>

<body <? if($_POST["id"] != "") { ?>onload="document.cart.ordre.value = ''; document.cart.submit();"<? } ?>>
<form enctype="multipart/form-data" method="post" name="cart">
<input type="hidden" name="ordre" value="<?= $_POST["ordre"] ?>" />

<table align="center">

<? if((mysql_num_rows($items) == 0 || $_POST["ordre"] != "") 
      && $_POST["id"] == "" && $connected == true) { ?>

<input type="hidden" name="id" />

<tr>
<td valign="top">
    <table>
    <tr>
    <td>item name: </td>
    <td><input type="text" name="name" onchange="save_item();" /></td>
    </tr>
    
    <tr>
    <td>price: </td>
    <td><input type="text" name="price" onchange="save_item();" /></td>
    </tr>
    
    <tr>
    <td>summary: </td>
    <td><textarea name="summary" onchange="save_item();"></textarea></td>
    </tr>
    
    <tr>
    <td>description: </td>
    <td><textarea name="description" onchange="save_item();"></textarea></td>        
    </td>
    </tr>
            
    <tr>
    <td>
    <input type="button" value="save" 
           onclick="document.cart.submit();"/>
                    
      
    <input type="button" value="cancel" 
           onclick="document.cart.ordre.value = '';
                    document.cart.id.value = '';
                    document.cart.submit();"/>
                    
                         
    <input type="button" value="log out" 
           onclick="logout();" />
    
    <br /><br /></td>        
    </tr>
    </table>
</td>

<td align="right" valign="top" nowrap>
thumbnail: <input type="file" name="thumbnail" onchange="NewThumb();" />
<br />
<img name="thumbnail_file" />
<br />
image: <input type="file" name="image" onchange="NewImage();" />
<br />
<img name="image_file" />
</td>
</tr>

<? } ?>

<? 
while(($item = mysql_fetch_assoc($items)) && ($_POST["id"] == null) && ($connected == true)) { 

$item_id = $item["id"];
$name = $item["name"];
$price = $item["price"];
$summary = $item["summary"];
$description = $item["description"];
$thumbnail = $item["thumbnail"];
$image = $item["image"];
$ordre = $item["ordre"];

if(is_dir("images/") == false)
   mkdir("images/", 0755);

$thumbnail_file = "images/item_" . $item_id . "_thumbnail.jpg";
if($thumbnail != "")
  {
  $thumbnail_file_handle = fopen("./" . $thumbnail_file, "wb");
  fwrite($thumbnail_file_handle, $thumbnail, strlen($thumbnail));
  chmod("./" . $thumbnail_file, 0644);
  }

$image_file = "images/item_" . $item_id . "_image.jpg";
if($image != "")
  {  
  $image_file_handle = fopen("./" . $image_file, "wb");
  fwrite($image_file_handle, $image, strlen($image));
  chmod("./" . $image_file, 0644);
  }
?>

<input type="hidden" name="id_<?= $item_id ?>" />

<tr>
<td valign="top">
    <table>
    <tr>
    <td>item name: </td>
    <td><input type="text" name="name_<?= $item_id ?>" value="<?= $name ?>" 
               onchange="save_item(<?= $item_id ?>);" /></td>
    </tr>
    
    <tr>
    <td>price: </td>
    <td><input type="text" name="price_<?= $item_id ?>" value="<?= $price ?>" 
               onchange="save_item(<?= $item_id ?>);" /></td>
    </tr>
    
    <tr>
    <td>summary: </td>
    <td><textarea name="summary_<?= $item_id ?>" 
                  onchange="save_item(<?= $item_id ?>);"><?= $summary  ?></textarea></td>
    </tr>
    
    <tr>
    <td>description: </td>
    <td><textarea name="description_<?= $item_id ?>" 
                  onchange="save_item(<?= $item_id ?>);"><?= $description  ?></textarea></td>
    </tr>
    
    <tr>
    <td>order: </td>
    <td><input type="text" name="ordre_<?= $item_id ?>" value="<?= $ordre ?>"
               onchange="save_item(<?= $item_id ?>);" /></td>
    </tr>
    
    <tr>
    <td>
    <input type="button" value="add a new item" 
           onclick="document.cart.ordre.value = <?= $ordre + 1 ?>;
                    document.cart.submit();"/>
     
                         
    <input type="submit" value="save" />
    
                         
    <input type="button" value="delete" 
           onclick="delete_item(<?= $item_id ?>);" />
           
                         
    <input type="button" value="log out" 
           onclick="logout();" />
    
    <br /><br />
    </td>
    </tr>
    </table>
</td>

<td align="right" valign="top" nowrap>
thumbnail: <input type="file" name="thumbnail_<?= $item_id ?>" onchange="NewThumb(<?= $item_id ?>);" />
<br />
<img name="thumbnail_file_<?= $item_id ?>" src="<?= $thumbnail_file ?>" />
<br />
image: <input type="file" name="image_<?= $item_id ?>" onchange="NewImage(<?= $item_id ?>);" />
<br />
<img name="image_file_<?= $item_id ?>" src="<?= $image_file ?>" />
<br />
</td>
</tr>

<? } ?>

<? if($connected == false) { ?>
<tr>
<td>Connection failed </td>
</tr>
<? } ?>

</table>
</form>
</body>
</html>

 

 

Link to comment
Share on other sites

got this error and bro mysql details already in db.php  :'(

 

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'www'@'localhost' (using password: NO) in /home/www/public_html/src/edit.php on line 4 Warning: mysql_query() [function.mysql-query]: Access denied for user 'www'@'localhost' (using password: NO) in /home/www/public_html/src/edit.php on line 70

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/www/public_html/src/edit.php on line 70

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/www/public_html/src/edit.php on line 71

Warning: mysql_query() [function.mysql-query]: Access denied for user 'www'@'localhost' (using password: NO) in /home/www/public_html/src/edit.php on line 141

Warning: mysql_query() [function.mysql-query]: A link to the server could not be established in /home/www/public_html/src/edit.php on line 141

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/www/public_html/src/edit.php on line 227

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/www/public_html/src/edit.php on line 290Connection failed


Link to comment
Share on other sites

what could cause this error?

 

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/www/public_html/src/edit.php on line 86 Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/www/public_html/src/edit.php on line 242

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/www/public_html/src/edit.php on line 305


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.