nu har jeg prøvet mig lidt frem og det virker stadigvæk ikke.
her er min kode
<html>
<body>
<?php
$var = @$_GET['q'];
$trimmed = trim($var);
if ($trimmed=="")
{
echo "please write something";
}
//connect to the database
$con = mysql_connect("localhost","*******","*******");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
//select the database
mysql_select_db("*******", $con);
// * = all
$query = "select * from Person where Name like \"%$var%\" ";
//post
while($row = mysql_fetch_array($result))
{
echo "Name: " . $row['Name'] . " Info: " . $row['Info'];
echo "<br />";
}
mysql_close($con);
?>
</body>
</html>
Indlæg senest redigeret d. 22.09.2009 10:01 af Bruger #15320