Einzelnen Beitrag anzeigen

Delphiturbo
(Gast)

n/a Beiträge
 
#8

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

  Alt 12. Jun 2008, 13:17
alles in Ordnung
Klein- und Großschreibung sind glaube ich nicht das Problem
Delphi-Quellcode:
<?php

    $cona = @mysql_connect("localhost","xxxxxx","xxxxx")
        or die(mysql_error());

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

$name = $HTTP_POST_VARS['name'];

$sql="SELECT * FROM tabelle1 WHERE name = '$name'";
$result = mysql_query($sql);

if ($name == "")

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

}

        
?>

<html>
<title>Test</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  $row->name;?>"></p>


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

<?php
}


?>
</form>
</body>
</html>
  Mit Zitat antworten Zitat