All pastes #613503 Raw Edit

search by lastname

public php v1 · immutable
·published 2007-07-11 00:40 UTC
rendered paste body
$con = db_connect();if (!$con)  {  die('Could not connect: ' . mysql_error());  }mysql_select_db($dbname, $con);$result = mysql_query('SELECT * FROM Customers WHERE LastName LIKE '%" . $lname . "%'";);        while($row = mysql_fetch_array($result)) {                echo "$row[LastName]";        };mysql_close($con);