title: React JS display the data after submitting
body: <p>Following is my react code which accepts the json format data and prints</p>
  
  <pre><code>          var DataInTableFormat = React.createClass({
                  getInitialState: function() {
                      return {
                        phpData: [] //initial value 
                      };//getInitialState
                  },//DataInTableFormat 
                  componentDidMount: function() {
                      $.get(this.props.source, function(result) { //storing the JSON data in result
                        var collection = JSON.parse(result);  //coverting JSON data to Javascript object
                        console.log(collection);
                        if (this.isMounted()) {//checking for component mount
                          this.setState({
                            phpData: collection
  
                         });
                        }
                      }.bind(this));
                  },
  
                     render:function()
                      {
  
                        DBdata = this.state.phpData || [];
                          return (
                          &lt;form&gt;
                          &lt;div&gt;Select ID :
                            &lt;select&gt;
                            {DBdata.map(function(d){
                              return(
                                      &lt;option value={d.id}&gt;{d.id}&lt;/option&gt;//prints the all id from the jsondata.php
                                     )}
                            )}
                            &lt;/select&gt;
                          &lt;button name="submit"&gt;submit&lt;/button&gt;
                         &lt;/div&gt; 
                         &lt;/form&gt;
                  )}
            });
            React.render(
              &lt;DataInTableFormat source="http://localhost/PHP-React-Demo/jsondata.php" /&gt;,
                document.getElementById('Table-data')
              );
  </code></pre>
  
  <p>When I select the ID I just want to print the all details in a table format after clicking on submit.</p>