Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 5th, 2012  |  syntax: None  |  size: 1.21 KB  |  hits: 15  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. PHP page with MySQL not showing/working
  2. <?php
  3. $cart1 = rawurldecode($_GET["path"]);
  4. list( , , , , , $cart2) = explode ("\", $cart1);
  5. $cart3 = $cart2;
  6. list($cart4) = explode (" ", $cart3);
  7.  
  8. $con = mysql_connect("SERVER","USER","PASS");
  9. if (!$con)
  10.   {
  11.   die('Could not connect: ' . mysql_error());
  12.   }
  13.  
  14. mysql_select_db("cartmatch", $con);
  15.  
  16. $result = mysql_query("SELECT * FROM cartmatch WHERE CARTNO='$cart4'");
  17.  
  18. while($row = mysql_fetch_array($result))
  19.   {
  20. echo '<form enctype="multipart/form-data" action="albumgo.php" method="POST"><input name="ID" type="hidden" value=';
  21. echo $_GET["ID"];
  22. echo ' ><input name="enabled" type="hidden" value=';
  23. echo $_GET["enabled"];
  24. echo ' ><input name="artist" type="hidden" value=';
  25. echo $_GET["artist"];
  26. echo ' ><input name="title" type="hidden" value="';
  27. echo $_GET["title"];
  28. echo '" >Name:<br/><input name="album" type="text" autofocus="autofocus" value="';
  29. echo $row['ALBUM'];
  30. echo '" ><input type="submit" name="edit" value="Save"></form>';
  31.   }
  32.  
  33. mysql_close($con);
  34. ?>
  35.        
  36. ini_set('display_errors', 1);
  37. ini_set('log_errors', 1);
  38. ini_set('error_log', dirname(__FILE__) . '/error_log.txt');
  39. error_reporting(E_ALL);
  40.        
  41. list($cart4) = explode (" ", $cart3);
  42.        
  43. list($cart4) = explode ("+", $cart3);