unexpected else statement in php : <p>My code retrieve videos based on user connection speed.</p>

<p>I am getting syntax error unexpected else on my code. i am troubleshooting this for the past few days and had run out of idea on how to solve it..</p>

<p>ajax code</p>

<pre><code>        $.ajax({
          method: "POST",
          url: "viewvideo.php",
          data: {speedMbps: speedMbps,
          video_id: $('[name="video_id"').val()},
          cache: false
        }).done(function( html ) {
            $( "#speed" ).val( html );
    });
</code></pre>

<p>viewvideo.php</p>

<pre><code> if(isset($_POST['video_id']) &amp;&amp; isset($_POST['speedMbps'] )){
                    $id = trim($_POST['video_id']);
                    $speed = $_POST['speedMbps'];
                    echo $id;

                    $result = mysqli_query($dbc , "SELECT `video_id`, `video_link` FROM `video480p` WHERE `video_id`='".$id."'");
                    $count = mysqli_num_rows($result);

                    if (($speed &lt; 100) &amp;&amp; ($count&gt;0)) {     //if user speed is less than 100 retrieve 480p quailtiy video   

                        //does it exist?
                        //if($count&gt;0){
                            //exists, so fetch it in an associative array
                            $video_480p = mysqli_fetch_assoc($result);
                            //this way you can use the column names to call out its values. 
                            //If you want the link to the video to embed it;
                            echo $video_480p['video_link'];                     
                            }

                        else{
                            //does not exist
                        }

    ?&gt;

                    &lt;video id="video" width="640" height="480" controls autoplay&gt;
                    &lt;source src="&lt;?php echo $video_480p['video_link']; ?&gt;" type="video/mp4"&gt;
                    Your browser does not support the video tag.
                    &lt;/video&gt;
                    &lt;br /&gt;

                    &lt;?php

                    $result2 = mysqli_query($dbc , "SELECT `video_id`, `video_link` FROM `viewvideo` WHERE `video_id`='".$video_id."'");
                    $count2 = mysqli_num_rows($result2);

                    // retrieve original video
                    else (($speed &gt;= 100) &amp;&amp; ($count2 &gt;0)) { 
                    //does it exist?
                        //if($count2&gt;0){
                            //exists, so fetch it in an associative array
                            $video_arr = mysqli_fetch_assoc($result2);
                            //this way you can use the column names to call out its values. 
                            //If you want the link to the video to embed it;
                            echo $video_arr['video_link'];                      
                            }

                        else{
                            //does not exist

                        }
                    }

    ?&gt;

                    &lt;video id="video" width="640" height="480" controls autoplay&gt;
                    &lt;source src="&lt;?php echo $video_arr['video_link']; ?&gt;" type="video/mp4"&gt;
                    Your browser does not support the video tag.
                    &lt;/video&gt;
                    &lt;br /&gt;

    &lt;?php
                    }
                mysqli_close($dbc);
    ?&gt;
</code></pre>
