How about an include? You can store where it goes for each value (ie. 1 => forms.html) and then it includes that file.
something like:
$sel_st = "SELECT * FROM locations WHERE page='$page'";
$sel_rs = mysql_query($sel_st);
$sel_ar = mysql_fetch_array($sel_rs);
include($sel_ar[url]);