Follow us on Twitter!
Never in the field of human conflict was so much owed by so many to so few. - Winston Churchill
Wednesday, April 23, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 23
Guests Online: 19
Members Online: 4

Registered Members: 82876
Newest Member: bhl1986
Latest Articles
View Thread

HellBound Hackers | Computer General | Webmasters Lounge

Author

?> problem :|


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 08-10-08 12:35
Hi,
I have a problem, have a look at the file first and then i will tell you what is wrong with it:

Code

<?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.
Author

RE: ?> problem :|

yours31f
Member



Posts: 1678
Location: Dallas Texas
Joined: 27.04.07
Rank:
Elite
Posted on 08-10-08 12:47
you do know that dreamweaver will not execute php right? At least not without a server that has it installed.


Debugging is what programmers do to beta software to make it take up more room on your hard drive if it is running too efficiently.


img259.imageshack.us/img259/3713/sigr.png

yours31f@live.com yours31f@yahoo.com rpwd.info
Author

RE: ?> problem :|


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 08-10-08 13:40
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.


Author

RE: ?> problem :|


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 08-10-08 14:15
UbYou wrote:

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





I need help quickly.


Note the double quotes


Edited by on 08-10-08 14:16
Author

RE: ?> problem :|


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 08-10-08 14:51
Good catch. I totally missed that looking through it.