0) { $row = mysql_fetch_row($res); $gotourl = $row[0]; header("location: $gotourl"); } else { echo "url not found!"; } header("location: $gotourl"); ?>