title: Upload Image though PHP, save Image path to MySQL
body: <p>Sure this is a easy one for you experts, I`m trying to upload a image to the site and save the path to the database. If possible, how can i change the image size before saving?</p>
  
  <p>Here is my script that handles to update query when updating:</p>
  
  <pre><code>&lt;?php   // Get Event ID
      $update=$_GET['update'];
  
      // Create Session
      $event_name=$_POST['event_name'];
      $event_description=$_POST['event_description'];
      $event_date=$_POST['event_date'];
      $event_time=$_POST['event_time'];
      $event_cost=$_POST['event_cost'];
      $event_image=$_POST['event_image'];
  
      // Connection to MySQL Database.
      include ('_includes/_dbconnection.php');
      include ('_includes/_dbopen.php');
  
      // Update Event using Event ID.
  
      $sql="UPDATE b_events SET ename = '$event_name', edescription = '$event_description', edate = '$event_date', etime = '$event_time', ecost = '$event_cost', eimage = '$event_image' WHERE id = '$update'";
      $result=mysql_query($sql);
  
      if($result){
      header('Location: _events.php');
      }
  
      else {
      header('Location: _home.php');
      }
  
  ?&gt;
  </code></pre>
  
  <p>I have the following code in the update.html for the image:</p>
  
  <pre><code>&lt;input name="event_image" type="file" /&gt;
  </code></pre>
  
  <p>Thanks!!!</p>