Hi, i’m a student from Holland and i am using a html/php code so that when you click search it will search a specific video (later it will be any video you type in) but when i click search the video only gets displayed as a link that i converted from youtube = images/1583999947y2mate.com but not the actual video itself like on my home page, i don’t get this to work because of the search function.
Website= http://viewed.csgja.com/viewed/Zoekpagina.php.
code:
<div class="search-box">
<form action="Zoekpagina.php" method="post">
<input class="search-text" type="text" name="search" placeholder="Zoek hier je video's">
<br><br>
<input class="search-btn" type="submit" name="verzend" value="Zoek" href="Zoekpagina.php" >
</a>
</form>
</div>
<?php
if(isset($_POST["verzend"]))
{
include "Connect.php";
$conn = mysqli_connect($server,$user,$pass,$db)
or die("Fout: Er is geen verbinding met de MySQL-server tot stand gebracht!");
$get=$_POST["search"];
if(isset($get))
{
$show="SELECT * FROM VideoPagina WHERE VideoNaam ='how to train'";
$result= mysqli_query($conn,$show);
while($rows = mysqli_fetch_assoc($result)){
echo $rows['Bestand'];
echo $rows['VideoNaam'];
echo $rows['VideoBeschrijving'];
echo "test";
echo"<br>";
}
}
else
{
echo"nothing found";
}
}
else
{
echo"Druk op de search button!";
}
?>