<?php

    
	if (isset($_POST['submit'])){

		if($use->add_advise($_POST)){
			echo "<script>location='./?page=advises&message=Link has been added successfully'</script>";
		}else{
			echo "<script>location='./?page=advises&message=Try again later!'</script>";
		}
	}
?>
<div class="row">

    <div class="col-md-12">

        <div class="card">

            <div class="card-header bg-transparent">

                <div class="row align-items-center">

                    <div class="col">

                        <h6 class="text-uppercase text-muted ls-1 mb-1">New Advise Video</h6>

                    </div>

                </div>

            </div>

            <div class="card-body">

                <form action="" method="post">
                    <div class="form-group mb-3">
                        <label for="">Title</label>
                        <input type="text" name="title" required class="form-control">
                    </div>
                    <div class="form-group mb-3">

                        <label for="">Youtube Link</label>

                        <input type="text" name="ylink" class="form-control">

                    </div>

                    <button type="submit" name="submit" class="btn btn-success">Add New</button>

                </form>

            </div>

        </div>

    </div>

</div>