Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/iano/public_html/tpforums-vb5/forum/includes/class_core.php on line 5842

PHP Warning: Use of undefined constant MYSQL_NUM - assumed 'MYSQL_NUM' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_ASSOC - assumed 'MYSQL_ASSOC' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_BOTH - assumed 'MYSQL_BOTH' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 588

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 612

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6
[PHP] MySQL Manager
Results 1 to 8 of 8

Thread: [PHP] MySQL Manager

  1. #1

    [PHP] MySQL Manager

    Hi, im trying to make a small MySQL manager in php, i've managed to list tables and everything but i can't seem to get the columns / fields right, i mean i can list them. but if i try to list the value in the same while loop it all turns to crap could anyone help me please?
    this is what i've got so far:
    Code:
    $table = $_GET['t'];
    		$mpass = $_SESSION['mpass'];
    		$muser = $_SESSION['muser'];
    		$mhost = $_SESSION['mhost'];
    		$mport = $_SESSION['mport'];
    		$mdb = $_SESSION['mdb'];
    		$m = mysql_connect($mhost, $muser, $mpass);
    		if($mport == 3306){
    			$con = mysql_connect($mhost, $muser, $mpass);
    		}
    		else{
    			$con = mysql_connect($mhost.":".$mport, $muser, $mpass);
    		}
    		mysql_select_db($mdb, $m);
    		echo "<center><b><font color=\"#0F9B6F\">MySQL Manager<br>Columns Of ".$mdb." </font></b></center><br>";
    		$fds = mysql_query("SHOW FIELDS FROM ".$table);
    		//$chmongurl = 1;
    		$cls = mysql_query("SELECT * FROM ".$table);//." WHERE id = ".$chmongurl
    		echo '<center><table border="1">';
    		$sup = 0;
    		while (($fields = mysql_fetch_row($fds)) && ($columns = mysql_fetch_row($cls))){
    			//if ($columns = mysql_fetch_row($cls)){
    			if(!$columns[$sup]){$xXcXx = "Empty";} else {$xXcXx = $columns[$sup];}
    				echo '<tr><td><center><b><font color="#68ad52"> '.$fields[0].' </font></b></center></td><td><center><b><font color="#98da26"> '.$columns[$sup].' </font></b></center></td></tr>';
    			//}
    			$sup++;
    		}
    		echo '</tr>';
    		echo '</table></center>';
    kind of unserious programming, but its only for my self for now anyways :P

    And the big problem, it takes the value from the one in the row below and that, it takes the right column but just the row under :/ every value moves down a row :s

    Sry if my english sucks xD

    --Edit, this is how it looks like right now: (this is a screenshot of the tables, not the columns since its not working anyways..)


  2. #2

    RE: [PHP] MySQL Manager

    Bring
    Up
    My
    PostPl0x

  3. #3

    RE: [PHP] MySQL Manager

    Your code is sensitive for sql injection. I suggest you to leave this project and start with something a bit easier.

  4. #4

    RE: [PHP] MySQL Manager

    sql injection? its a php-shell script im working on.. it's only ment to be uploaded on unsecure websites anywayz ;P

  5. #5

    RE: [PHP] MySQL Manager

    Quote Originally Posted by Milice
    sql injection? its a php-shell script im working on.. it's only ment to be uploaded on unsecure websites anywayz ;P
    Whatever, this script use unfiltred value from $_GET in SQL queries so its SQL Injection sensitive. Anyway in my opinion you are just another script kiddie that dont understand "own" source code. I hope that nobody will help you with this kind of scripts.

  6. #6

    RE: [PHP] MySQL Manager

    Quote Originally Posted by Yaboomaster
    Quote Originally Posted by Milice
    sql injection? its a php-shell script im working on.. it's only ment to be uploaded on unsecure websites anywayz ;P
    Whatever, this script use unfiltred value from $_GET in SQL queries so its SQL Injection sensitive. Anyway in my opinion you are just another script kiddie that dont understand "own" source code. I hope that nobody will help you with this kind of scripts.
    Thank you for being a complete asshole, i hope you burn in hell. Kisses ;*

  7. #7

    RE: [PHP] MySQL Manager

    Quote Originally Posted by Milice
    Thank you for being a complete asshole, i hope you burn in hell. Kisses ;*
    You should search and learn what's SQL Injection, then you would know what Yaboo is talking about..

    Also I don't belive someone will help you with your 'HackTool', cuz we from TPForums hate lammers and you look one.

  8. #8

    RE: [PHP] MySQL Manager

    yay ban that bich xD

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •