Welcome to HBH! If you had an account on hellboundhacker.org you will need to reset your password using the Lost Password system before you will be able to login.

?> problem :|


ghost's Avatar
0 0

Hi, I have a problem, have a look at the file first and then i will tell you what is wrong with it:

<?php

//Prisijungiame prie duomenu bazes
$link = mysql_connect ("localhost","username","password")
  or die("could not connect: " . mysql_error());
mysql_select_db("moviesite", $link)
  or die (mysql_error());
  
$ImageDir = "images";
$ImageThumb = "$ImageDir . "/thumbs/";
?>


<html>
<head>
<title>Galerija</title>
</head>
<body>
<p align="center"> Spustelkit ant paveiksliuko kad pamatytumet dideli vaizda.</p>
<table align="center">
 <tr>
  <td align="center">Paveiksliukas</td>
  <td align="center">Pavadinimas</td>
  <td align="center">Uploaderis</td>
  <td align="center">Data</td>
  </tr>
  
  <?php
//gauname iconus
$getpic = mysql_query("SELECT * FROM images")
  or die (mysql_error());
while ($rows = mysql_fetch_array($getpic)) {
 extract ($rows);
 echo"<tr>\n";
 echo"<td><a href=\"".$ImageDir . $image_id . ".jpg\">";
 echo"<td><a href=\"".$ImageDir . $image_id . ".jpg\" border=\"0\">";
 echo"</a></td>\n";
 echo"<td>" . $image_caption . "</td>\n";
 echo"<td>" . $image_username . "</td>\n";
 echo"<td>" . $image_date . "</td>\n";  
 echo"</tr>\n";

}

?>
</table>
</body>
</html>

Rigth, see this bit: $ImageDir = "images"; $ImageThumb = "$ImageDir . "/thumbs/"; ?>

The ?> bit doesent read that the php flow should be finished. Just add the code to your dreamweaver and u will see.

I need help quickly.


yours31f's Avatar
Retired
10 0

you do know that dreamweaver will not execute php right? At least not without a server that has it installed.


ghost's Avatar
0 0

UbYou wrote: The ?> bit doesent read that the php flow should be finished. Just add the code to your dreamweaver and u will see.

It looks fine to me… don't know why Dreamweaver would not notice that correctly. I don't use Dreamweaver to code PHP, though. Try these alternatives:

  1. Notepad++/Notepad2/PsPad - Windows
  2. gEdit - Linux (GNOME)
  3. TextWrangler - Mac OS X

All the important features… less filling.


ghost's Avatar
0 0

UbYou wrote:

$ImageThumb = ***"***  $ImageDir . ***"***   /thumbs/    ***"***;
?>

I need help quickly.

Note the double quotes


ghost's Avatar
0 0

Good catch. I totally missed that looking through it.