Hat sich erledigt
							
						
					PHP Datenbank problem
				
					Collapse
				
			
		
	X
- 
	
	
	
		
	
	
		
		
		
		
		
		
		
	
	
 Brich mal bitte deinen Code um. Mein Monitor ist nicht 3 Meter breit sorry  
 
 Das ist ja absolutes Kraut und Rüben! Schon mal was von REGISTER GLOBALS gehört? Ist es on oder off? Warum stehen Variablen in "" bzw. noch schlimmer in ''????
 
 Bereinige am besten mal den Pfusch, und versuche es nochmal h.a.n.d. h.a.n.d.
 Schmalle
 
 http://impressed.by
 http://blog.schmalenberger.it
 
 
 
 Wichtige Anmerkung: Ich habe keine Probleme mit Alkohol ...
 ... nur ohne :-)
 
- 
	
	
	
		
	
	
		
		
		
		
		
		
		
	
	
 REGISTER GLOBALS ist OFF.Original geschrieben von schmalle
 Brich mal bitte deinen Code um. Mein Monitor ist nicht 3 Meter breit sorry  
 
 Das ist ja absolutes Kraut und Rüben! Schon mal was von REGISTER GLOBALS gehört? Ist es on oder off? Warum stehen Variablen in "" bzw. noch schlimmer in ''????
 
 Bereinige am besten mal den Pfusch, und versuche es nochmal  
 
 und was meinst du mit "" oder schreibt man variablen nicht in "".
 Comment
- 
	
	
	
		
	
	
		
		
		
		
		
		
		
	
	
 Er meint damit dass der Parser die Var '$bla' nicht findet, denn Vars werden in Strings nur so gefunden "$bla".
 
 Gruss
 
 tobiGutes Tutorial | PHP Manual | MySql Manual | PHP FAQ | Apache | Suchfunktion für eigene Seiten
 
 [color=red]"An error does not become truth by reason of multiplied propagation, nor does truth become error because nobody sees it."[/color]
 Mohandas Karamchand Gandhi (Mahatma Gandhi) (Source)
 Comment
- 
	
	
	
		
	
	
		
		
		
		
		
		
		
	
	
 @jahlives: und auch das ist KEIN guter programmierstil!
 
 
 und brich bitte endlich den code um, ich habe hier 2 17" TFT @1280 x 1024 und muss trotzdem noch scrollen!Für alle die Fehler suchen, gibts gratis tolle Debuggingmöglichkeiten: 
 var_dump(), print_r(), debug_backtrace und echo.
 Außerdem gibt es für unsere Neueinsteiger ein hervorragendes PHP Tutorial zu PHP 4 und PHP 5 (OOP)
 Es heißt $array['index'] und nicht $array[index]! Und nein, das ist nicht egal!  
 Dieses Thema lesen, um Ärger im Forum und verzögerte Hilfen zu vermeiden.
 Comment
- 
	
	
	
		
	
	
		
		
		
		
		
		
		
	
	
 so oder ....
 
 PHP Code:<?php
 if ($action == "tabauswahl" ) {
 ?>
 <form name="Formular" action=<?php echo $PHP_SELF; ?> method=post>
 <?
 $result = mysql_list_tables($db_name);
 
 echo "<select name='$tab1'>";
 for($i=0; $i<mysql_num_rows($result); $i++)
 {
 $tab1 = mysql_tablename($result,$i);
 echo "<option value="$tab1">"$tab1"</option>";
 }
 echo "</select>";
 ?>
 <input type=submit value="Auswaehlen"></form>
 <?
 }
 $table = "$tab1";
 ?>
 Comment
- 
	
	
	
		
	
	
		
		
		
		
		
		
		
	
	
 Ich habe auch ned behauptet, dass dies sauber wäre. Ich wollte nur seine Frage beantworten@jahlives: und auch das ist KEIN guter programmierstil!  
 
 Gruss
 
 tobiGutes Tutorial | PHP Manual | MySql Manual | PHP FAQ | Apache | Suchfunktion für eigene Seiten
 
 [color=red]"An error does not become truth by reason of multiplied propagation, nor does truth become error because nobody sees it."[/color]
 Mohandas Karamchand Gandhi (Mahatma Gandhi) (Source)
 Comment
- 
	
	
	
		
	
	
		
		
		
		
		
		
		
	
	
 Und das hat zur Folge, dass Dein gesamtes Script gar nicht funktionieren kann. Du musst schon SAUBER programmieren mit dieser Einstellung. Informiere Dich mal über $_GET $_POST usw. Die Biester heissen auch Superglobals.REGISTER GLOBALS ist OFF.h.a.n.d.
 Schmalle
 
 http://impressed.by
 http://blog.schmalenberger.it
 
 
 
 Wichtige Anmerkung: Ich habe keine Probleme mit Alkohol ...
 ... nur ohne :-)
 Comment
- 
	
	
	
		
	
	
		
		
		
		
		
		
		
	
	
 Du solltest dich, wie schmalle geschrieben hat, eben nicht auf register_globals=on verlassen.
 Das ist auf jeden Fall sauberer als mit globals on zu arbeiten.PHP Code:<?php echo $_SERVER['PHP_SELF']; ?>
 
 Gruss
 
 tobiGutes Tutorial | PHP Manual | MySql Manual | PHP FAQ | Apache | Suchfunktion für eigene Seiten
 
 [color=red]"An error does not become truth by reason of multiplied propagation, nor does truth become error because nobody sees it."[/color]
 Mohandas Karamchand Gandhi (Mahatma Gandhi) (Source)
 Comment
 
          


Comment