All pastes #519993 Raw Edit

Untitled

public php v1 · immutable
#519993 ·published 2007-05-29 20:29 UTC
rendered paste body
$departure_2 = $_POST['destination_2'];	$query = "SELECT id, region, main_location, specific_location FROM locations WHERE id='".mysql_escape_string($departure_2)."'";	$result = mysql_query($query, $link);	 while($row=mysql_fetch_array($result)) {		if ($row['specific_location']) { $departure_2_text = $row['specific_location']; }		if (($row['main_location']) && (!$row['specific_location'])) { $departure_2_text = $row['main_location']; }		if (($row['region']) && (!$row['main_location']) && (!$row['specific_location'])) { $departure_2_text = $row['region']; }		$departure_2_text = $row['specific_location'];	}