Jump to content

Search the Community

Showing results for tags 'render'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • HTML/XHTML
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • XSLT/XSL-FO
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Location


Interests


Languages

Found 1 result

  1. Here I can upload videos successfully into database and videos are saving in appropriate folder named "uploaded". As I mentioned in question, once after uploading the video, if I refresh the browser the previously uploaded video is going saving in my database. Another question is, if I click on the video(displayed name in myvideo.php), video is not going to display instead I am getting "Object Not Found" error. I request you people to give me solutions to solve these problems. Below I am posting my code: myvideo.php: <div class="content"><div class="card"><div class="header" id="stand-fix" style="border-bottom: 1px solid #E1E1E1;"><?phpif(isset($_POST['submit'])){// $conn = mysqli_connect("localhost", "root", "", "videos") or die(mysqli_error());$name = (isset($_FILES['file']['name']) ? $_FILES['file']['name'] : '');$temp = (isset($_FILES['file']['tmp_name']) ? $_FILES['file']['tmp_name'] : '');move_uploaded_file($temp, "uploaded/".$name);$url = "http://localhost/xampp/htdocs/VS/uploaded/$name";mysqli_query($database, "INSERT INTO video VALUE ('','$name','$url')");}?><form action="myvideo.php" method="post" enctype="multipart/form-data"><div class="row"><div class="col-md-7"><h4 class="title">My Videos</h4></div><div class="col-md-3"><input type="file" name="file" class="btn btn-primary" style="font-size: 15px;"><br /></div><div class="col-md-2"><input type="submit" name="submit" class="btn btn-primary pull-right" style="font-size: 15px;" value="Upload"></div></div></form><?phpif(isset($_POST['submit'])){echo '<script language="javascript">';echo 'alert("Your video has been successfully uploaded.")';echo "window.location.href='dashboard.php'";echo '</script>';}?><hr width="50%"></div><div class="content" style="height: 30em; direction: ltr; overflow: auto;"><div class="row" style="margin-left:4em;" style="direction: rtl;"><?php$database = mysqli_connect("localhost", "root", "", "videos") or die(mysqli_error());$query = mysqli_query($database, "SELECT * FROM video");while($row=mysqli_fetch_assoc($query)){$id = $row['id'];$name = $row['name'];$url = $row['url'];echo "<p style='margin:0.5em;'><a href='watch.php?id=$id' style='color:red;'>$id&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$name</a></p><br />";echo "<embed src='.$id.$url.'><video width='200' height='200' controls></video></embed>";}?></div></div></div></div> watch.php<?php$conn = mysqli_connect("localhost", "root", "", "videos") or die(mysqli_error());if(isset($_GET['id'])){$id = $_GET['id'];$query = mysqli_query($conn, "SELECT * FROM video WHERE id='$id'");while($row=mysqli_fetch_assoc($query)){$name = $row['name'];$url = $row['url'];}echo "<p style='font-size:20px;'><center>You are watching ".$name."</center></p><br /><embed src='.$url.'><video width='600' height='400' controls></video></embed>";}else{echo "Error!";}?>
×
×
  • Create New...