Join us at IRC!
The measure of a mans life is not how well he dies, but how well he lives.
Thursday, May 24, 2012
Navigation
Members Online
Total Online: 29
Web Spiders: 18
Guests Online: 27
Members Online: 2

Registered Members: 70180
Newest Member: RAWRFEARME744798
Latest Articles
View Thread

HellBound Hackers | Computer General | Webmasters Lounge

Author

?> problem :|

UbYou
Member

Posts: 37
Location:
Joined: 16.01.08
Rank:
Newbie
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:


<?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
Second to one



Posts: 1678
Location: Dallas Texas
Joined: 27.04.07
Rank:
Satan
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.



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

RE: ?> problem :|

Zephyr_Pure
Member



Posts: 2402
Location:
Joined: 15.09.06
Rank:
God
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.


I still check PMs from time to time.




Our responses were moronic, why shouldn't he follow suit? - Futility
Author

RE: ?> problem :|

Chinchilla3k
Member



Posts: 72
Location:
Joined: 11.05.07
Rank:
Newbie
Posted on 08-10-08 14:15
UbYou wrote:


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


I need help quickly.


Note the double quotes


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

RE: ?> problem :|

Zephyr_Pure
Member



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


I still check PMs from time to time.




Our responses were moronic, why shouldn't he follow suit? - Futility
Guest
Username

Password

Remember Me


Bookmark This Page
Affiliates
Adverts

 

 

Links
By using, viewing or obtaining any information contained on this site, you agree to the disclaimer.

© HellBound Hackers 2008- 2009. Since 3rd December 2004.