title: Enable posting in browser (post.php?name=MyName&body=MyText?)
body: <p>I've created a text posting website. Except the posting on the post.php page I want to enable users to post text when they type www.mywebsite.com/post.php?name=MyName&amp;body=MyText? How can I make this?</p>
  
  <p>The post code looks like this:</p>
  
  <pre><code>  &lt;?php
  
  
    //insert category to database
    if(isset($_POST['qty'])) {
      // Fetch and clean the &lt;select&gt; value.
      // The (int) makes sure the value is really a integer.
      $qty = (int)$_POST['qty'];
  
  
      // Create the INSERT query.
      $sql = "INSERT INTO `table`(`quantity`)
              VALUES ({$qty})";
  
      // Connect to a database and execute the query.
      $dbLink = mysql_connect('MyServer', 'username', 'password') or die(mysql_error());
                mysql_select_db('database_name', $dbLink) or die(mysql_errno());
  
      $result = mysql_query($sql);
  
      // Check the results and print the appropriate message.
      if($result) {
          echo "Record successfully inserted!";
      }
      else {
          echo "Record not inserted! (". mysql_error() .")";
      }
  }
  
  
  
       if ($_POST['post'])
  {
      //get data
      $title = $_POST['title'];
      $body = $_POST['body'];
  
      //check for existance
      if ($title&amp;&amp;$body)
      {
          mysql_connect("MyServer","username","password") or die(mysql_error());
          mysql_select_db("database_name") or die(mysql_error());
  
          $date = date("Y-m-d");
  
          //insert data
          $insert = mysql_query("INSERT INTO news VALUES ('','$title','$body','$date')") or die(mysql_error());
  
          die("Your text has been posted!");
  
      }
      else
          echo "Please fill out your name and text";
  }
  ?&gt;
  </code></pre>