Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with a Script!

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
This script will read 4 pictures from a MySql-Database. When I`m click on a picture, I only see a

blanc site. How is the bug? (Sorry for my english, I am from germany).

<?php
require(&quot;config.php&quot;);
?>

<HTML>
<HEAD>
</HEAD>
<BODY>

<?php
mysql_connect(&quot;$host&quot;,&quot;$user&quot;,&quot;$pass&quot;);
mysql_select_db(&quot;$database&quot;);
$result = mysql_query(&quot;select * from products where(objekt_nr = '$objekt_nr') ORDER BY

'objekt_nr'&quot;);

$i = 0;

while($row = mysql_fetch_row($result)) {

$bild = array(1 => &quot;images/$row[26]&quot;,&quot;images/$row[27]&quot;,&quot;images/$row[28]&quot;,&quot;images/$row[29]&quot;);
$thumbs = array(1 => &quot;images/$row[26]&quot;,&quot;images/$row[27]&quot;,&quot;images/$row[28]&quot;,&quot;images/$row[29]&quot;);
if (!$gross) {
$gross = 1;
$klein1 = 2;
$klein2 = 3;
$klein3 = 4;
$klein4 = 1; }

echo &quot;<Table border=1>
<TR><TD align=\&quot;left\&quot; valign=\&quot;top\&quot;>
<img src=\&quot;$bild[$gross]\&quot; width=250><BR>
<a href=\&quot;$PHPSELF?klein1=$gross&gross=$klein1&klein2=$klein2&klein3=$klein3\&quot;><img

src=\&quot;$thumbs[$klein1]\&quot; border=0 width=80></a>
<a href=\&quot;$PHPSELF?klein2=$gross&gross=$klein2&klein1=$klein1&klein3=$klein3\&quot;><img

src=\&quot;$thumbs[$klein2] \&quot; border=0 width=80></a>
<a href=\&quot;$PHPSELF?klein3=$gross&gross=$klein3&klein1=$klein1&klein2=$klein2\&quot;><img

src=\&quot;$thumbs[$klein3]\&quot; border=0 width=80></a>
<P></table>&quot;;
}

?>

</BODY>
</HTML>
 
hello

check this

<a href=\&quot;$PHPSELF?klein1=$gross&gross=$klein1&klein2=$klein2&klein3=$klein3\&quot;>

do u mean predefined variable $PHP_SELF here.
it links to the same php script

cheers
spookie
 
Hello Spookie,
thank`s for your answer, but this was not the bug.

Thomas
 
$gross = 1;
$klein1 = 2;

$PHPSELF?klein1=$gross&gross=$klein1
translated form variables as listed above.
$PHP_SELF?klein1=1($gross)//you already told it its 2
and then gross=klein1 which was 2 but you told it now its 1 so make your mind up ;) ***************************************
Party on, dudes!
[cannon]
 
Das hat leider auch nicht geholfen. Ich werde dieses Problem wahrscheinlich in diesem Leben nicht mehr lösen können.
Trotzdem danke für die Versuche mir zu helfen!
Thomas
 
Das hat leider auch nicht geholfen. Ich werde dieses Problem wahrscheinlich in diesem Leben nicht mehr lösen können.
Trotzdem danke für die Versuche mir zu helfen!
Thomas
 
well ... my German is not that good, can anyone translate, please? Anikin
Hugo Alexandre Dias
Web-Programmer
anikin_jedi@hotmail.com
 
Thats exaclty what I asked on another forum... I got this reply :

Det hjälpte tyvärr inte heller. Jag kan aldrig i detta liv lösa detta problem.
Trots det tackar jag för dit försök att hjälpa mig !

:)
Still waiting for english translation .... ***************************************
Party on, dudes!
[cannon]
 
So it said:

That did not unfortunately also help. I will not be able to solve this problem probably in this life no more. Nevertheless thanks me for the attempts to help! ***************************************
Party on, dudes!
[cannon]
 
Theres also this change :
$result = mysql_query(&quot;select * from products where objekt_nr = '$objekt_nr' ORDER BY 'objekt_nr'&quot;);
***************************************
Party on, dudes!
[cannon]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top