Delphi-PRAXiS
Seite 3 von 4     123 4      

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Programmieren allgemein (https://www.delphipraxis.net/40-programmieren-allgemein/)
-   -   Delphi if($name=="") {xxxx} funktioniert nicht ? (https://www.delphipraxis.net/115458-if-%24name%3D%3D-%7Bxxxx%7D-funktioniert-nicht.html)

mkinzler 12. Jun 2008 14:14

Re: if($name=="") {xxxx} funktioniert nicht ?
 
Du übergibst mit POST und bekommst dies per GET?
Kann ich kaum glauben.

Die Muhkuh 12. Jun 2008 14:16

Re: if($name=="") {xxxx} funktioniert nicht ?
 
Das hat er ja verbessert.

Delphiturbo 12. Jun 2008 14:59

Re: if($name=="") {xxxx} funktioniert nicht ?
 
Zitat:

Zitat von CK_CK
@Delphiturbo: Also so wird das nichts... Poste mal deinen gesamten Code (oder häng' ihn in den Anhang). Dann kann man den Fehler auch besser finden ;)

Chris

Delphi-Quellcode:
<?php

    $cona = @mysql_connect("localhost","xxxx","yyyy")
        or die(mysql_error());

    $cona_db = mysql_select_db("xxxx", $cona)
        or die(mysql_error());


$name = $_GET['name'];

$sql="SELECT * FROM tabelle1 WHERE name = '$name'";
$result = mysql_query($sql);
if( mysql_num_rows( mysql_query( "select * from tabelle1 where name='$name'" ) ) <> 0 )
{

$result = mysql_query("SELECT name FROM tabelle1 order by name DESC LIMIT 1")
        or die(mysql_error());
}
       
?>

<html>
<title>Test1</title>
<body>
<form action="#" method="post" name="formular">
<?php

while($row = mysql_fetch_object($result))
{
?>



<input type="text" name="name" size="50" value="<?php echo $_GET['name'];?>"></p>

<tr>
<td align="center"><input type="submit" name="submit" value="senen"></td>
</tr>
</table>

if (empty($name))

{
header ("Location: http://www.google.de");

}

<?php
}

?>
</form>
</body>
</html>
Die Seite von google wird aufgerufen ohne zu Klicken auf Senden !

Die Muhkuh 12. Jun 2008 15:00

Re: if($name=="") {xxxx} funktioniert nicht ?
 
Verstehst Du, was Du schreibst?

Ich sag nur nochmal: POST != GET!

DeddyH 12. Jun 2008 15:05

Re: if($name=="") {xxxx} funktioniert nicht ?
 
Ich verweise nochmal auf #11.

mkinzler 12. Jun 2008 15:07

Re: if($name=="") {xxxx} funktioniert nicht ?
 
Zitat:

Zitat von DeddyH
Ich verweise nochmal auf #11.

Um diese Frage zu beantworten, fehlt ihm das Verständnis für die Funktion des Codes

Die Muhkuh 12. Jun 2008 15:09

Re: if($name=="") {xxxx} funktioniert nicht ?
 
Und das wissen wir ja alle :zwinker:

DeddyH 12. Jun 2008 15:10

Re: if($name=="") {xxxx} funktioniert nicht ?
 
Dann wird ihm das Verständnis hierfür wohl leider auch fehlen.

Delphiturbo 12. Jun 2008 15:42

Re: if($name=="") {xxxx} funktioniert nicht ?
 
Mein 2. Fehler liegt nicht nur an Code sondern an mich selbst, da ich php-Frage in Delphi Forum gestellt habe :mrgreen:

vergesst es :witch:

mkinzler 12. Jun 2008 15:44

Re: if($name=="") {xxxx} funktioniert nicht ?
 
Nein, dass du nicht auf die Tipps hier hörst.


Alle Zeitangaben in WEZ +1. Es ist jetzt 05:39 Uhr.
Seite 3 von 4     123 4      

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz