To be blunt, I'm new to OpenLayers. I have a database of WGS84 coordinates which I've loaded into a database. I've verified that this works by echoing latitudes and longitudes.
map = new OpenLayers.Map("map");
var mapnik = new OpenLayers.Layer.OSM();
map.addLayer(mapnik);
map.setCenter(new OpenLayers.LonLat(<?php echo $lat;?>, <?php echo $lon;?>).transform(
new OpenLayers.Projection("EPSG:4326"), // transform from WGS 1984
new OpenLayers.Projection("EPSG:900913") // to Spherical Mercator Projection
), 4 /*Zoom level*/);
When putting into here, it moves the map to 0,0. Can anyone help or point me in the right direction?