title: Data from javascript code insert to mysql database
body: <p>Here I have a script which help me to get places from google places API. So now I want to store all this into mysql but how? I'm new to mysql and php, and how to store data that I get from google places to database?</p>
  
  <p>What I need to do here? Can someone show me on my example...</p>
  
  <p>How to combine php and javascript;</p>
  
  <p>CODE: <a href="http://jsbin.com/AlEVaCa/1" rel="nofollow">http://jsbin.com/AlEVaCa/1</a></p>
  
  <p>So I need to store data which I got from google:</p>
  
  <pre><code>google.maps.event.addListener(marker,'click',function(){
          service.getDetails(request, function(place, status) {
            if (status == google.maps.places.PlacesServiceStatus.OK) {
              var contentStr = '&lt;h5&gt;'+place.name+'&lt;/h5&gt;&lt;p&gt;'+place.formatted_address;
              if (!!place.formatted_phone_number) contentStr += '&lt;br&gt;'+place.formatted_phone_number;
              if (!!place.website) contentStr += '&lt;br&gt;&lt;a target="_blank" href="'+place.website+'"&gt;'+place.website+'&lt;/a&gt;';
              contentStr += '&lt;br&gt;'+place.types+'&lt;/p&gt;';
              infowindow.setContent(contentStr);
              infowindow.open(map,marker);
            } else { 
              var contentStr = "&lt;h5&gt;No Result, status="+status+"&lt;/h5&gt;";
              infowindow.setContent(contentStr);
              infowindow.open(map,marker);
            }
          });
  
      });
  </code></pre>
  
  <p>I want to store all place.name,website ... etc. data to mydatabase. How to do that?
  Is there any way to store this data?</p>