Search Results

Search found 4 results on 1 pages for 'user547794'.

Page 1/1 | 1 

  • Passing PHP session variable to AJAX URL

    - by user547794
    Hello, I am trying to pass a session variable into an AJAX loaded page. Here is the code I am using: jQuery(document).ready(function(){ $("#userdetail").click(function() { $.ajax({ url: "userdetail.php?id=<?php $_SESSION['uid']?>", success: function(msg){ $("#results").html(msg); } }); }); }); This is the HTML URL I had working, not sure how to get this into the AJAX call: userdetail.php?id=<?php $_SESSION['uid']?> I should also mention that if I manually pass in the userID it works fine url: "userdetail.php?id=1",

    Read the article

  • Google Map lng + lat to hidden field not working

    - by user547794
    Hello, I am trying to get Marker data into hidden fields on my form. I'm not sure why this isn't working, it must be something in my js syntax: var initialLocation; var siberia = new google.maps.LatLng(60, 105); var newyork = new google.maps.LatLng(40.69847032728747, -73.9514422416687); var browserSupportFlag = new Boolean(); function initialize() { var myOptions = { zoom: 6, mapTypeId: google.maps.MapTypeId.HYBRID }; var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions); myListener = google.maps.event.addListener(map, 'click', function(event) { placeMarker(event.latLng), google.maps.event.removeListener(myListener); }); // Try W3C Geolocation (Preferred) if(navigator.geolocation) { browserSupportFlag = true; navigator.geolocation.getCurrentPosition(function(position) { initialLocation = new google.maps.LatLng(position.coords.latitude,position.coords.longitude); map.setCenter(initialLocation); }, function() { handleNoGeolocation(browserSupportFlag); }); // Try Google Gears Geolocation } else if (google.gears) { browserSupportFlag = true; var geo = google.gears.factory.create('beta.geolocation'); geo.getCurrentPosition(function(position) { initialLocation = new google.maps.LatLng(position.latitude,position.longitude); map.setCenter(initialLocation); }, function() { handleNoGeoLocation(browserSupportFlag); }); // Browser doesn't support Geolocation } else { browserSupportFlag = false; handleNoGeolocation(browserSupportFlag); } function handleNoGeolocation(errorFlag) { if (errorFlag == true) { alert("Geolocation service failed."); initialLocation = newyork; } else { alert("Your browser doesn't support geolocation. We've placed you in Siberia."); initialLocation = siberia; } } function placeMarker(location) { var marker = new google.maps.Marker({ position: location, map: map, draggable: true }); map.setCenter(location); } } var lat = latlng.lat(); var lng = latlng.lng(); document.getElementById("t1").value=lat; document.getElementById("t2").value=lng; <input type="hidden" name="lat" id="t1"> <input type="hidden" name="long" id="t2">

    Read the article

  • PHP MySQL query help

    - by user547794
    Hello, I am trying to use this query to return every instance where the variable $d['userID'] is equal to the User ID in a separate table, and then echo the username tied to that user ID. Here's what I have so far: $uid = $d['userID']; $result = mysql_query("SELECT u.username FROM users u LEFT JOIN comments c ON c.userID = u.id WHERE u.id = $uid;")$row = mysql_fetch_assoc($result); echo $row['username'];

    Read the article

  • PHP URL GET parameters inside URL parameter

    - by user547794
    Hello, I am developing facebook/myspace content share buttons. The Facebook link takes you to a URL on my website, but I need to pass additional parameters to my URL along with the parameters passed to facebook. Here's my example: http://www.facebook.com/share.php?t=MyCompany&u=http://foobar.com/test7.php?Share=161&FbShare=Facebook28 Do I need to escape something inside the "u" parameter?

    Read the article

1