title: Unable to upload and display text from database
body: <p>Error:</p>
  
  <blockquote>
    <p>Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';'display.php on line 12</p>
  </blockquote>
  
  <p>Code:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;?php
  mysql_connect('com', '1', 'P');
  mysql_select_db('add');
  $query =mysql_query('select * from addimage');
  while( $row = mysql_fetch_assoc($query) )
  {
  echo '&lt;div style="min-width:300px;height:100px;border:red 5px;float:left;"&gt;''&lt;a href='.$row['url'].&gt;'.$row['name'].'&lt;/a&gt;''&lt;/div&gt;';
  }
  
  ?&gt;
  </code></pre>
  
  <p>These php code uploaded url  but not name add.php</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;?php
  $servername = "com";
  $username = "1";
  $password = "P";
  $dbname = "add";
  // Create connection
  $conn = mysqli_connect($servername, $username, $password, $dbname);
  // Check connection
  if (!$conn) {
      die("Connection failed: " . mysqli_connect_error());
  }
  $URL=$_POST['url'];
  $NAME=$_POST['name'];
  $sql = "INSERT INTO addimage (url,name)VALUES ('$URL','$NAME')";
  
  if (mysqli_query($conn, $sql)) {
      include('done.php');
  } else {
      echo "Error: " . $sql . "&lt;br&gt;" . mysqli_error($conn);
  }
  mysqli_close($conn);
  ?&gt;
  </code></pre>
  
  <p>HERE IS MY FORM</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;form action="add.php" method="post" enctype="multipart/form-data"&gt;
     &lt;label&gt;Image URL&lt;input type="url" name="url"&gt;&lt;br&gt;&lt;/label&gt;&lt;br&gt;
     &lt;label&gt;Your Name &lt;input typr="text" name="text"&gt;&lt;br&gt;&lt;/label&gt;
     &lt;input type="submit" value="Upload"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I want to Display name stored in table 'name'
  and link it to url stored in field in 'url' in same column</p>
  
  <pre><code>|  id     |      url          |   name   |
  |1        | http:\\stack.com  |   me     |
  </code></pre>
  
  <p>I want to display me and link it to http:\stack.com
  (Imagine I have 10000 url and I want to display only unvisited url) of the user</p>
  
  <p>This code are written in a protected page seen after logging in</p>