mike
mike

Reputation: 3

How do I insert a variable for an html link?

This is my file:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php
   error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING);
   $variabile_get = $_GET['var'];
?>
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
  <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
  <meta name="author" content="Amin Developer!" />
  <title>Untitled 1</title>
 </head>
 <body>
 <p>
  <video src="http://serverfilm:8080/movie/test/test/2000.mkv" type='video/x-matroska; codecs="theora, vorbis"' autoplay controls onerror="failed(event)" ></video>
  </p>
 </body>
</html>

I thought it was enough to put: src = "var" to pass other HTML links to src but I’m missing something, can you help me?

Upvotes: 0

Views: 51

Answers (1)

Sanjun Dev
Sanjun Dev

Reputation: 518

Use this

  <video src="<?php echo $variabile_get; ?>" type='video/x-matroska; codecs="theora, vorbis"' autoplay controls onerror="failed(event)" > </video>

Upvotes: 1

Related Questions