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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

String Problem with DBMS

Status
Not open for further replies.

AIX5L

Technical User
Joined
Jul 27, 2001
Messages
228
Location
CH
Hi my Problem is, that my query Result in Database ex: ( This is a Test ) will only be diplayed in my HTML Code as "This" and where is the rest ?
Can anybody help me to understand my Problem ?

thanks

$query = "SELECT T2.TITEL,T2.SUCHTEXT,T2.BILDTEXT,T2.AUFNAHMEORT,T2.AUFNAHMEDATUM,T4.LAGERORT,T3.FIRMA,T2.IMAGE_ID FROM T2, T3, T4 WHERE T2.KDNR = T3.KDNR AND T2.IMAGE_ID=$BILDERSUCHE";

$value = odbc_exec( $connect, $query );

while(odbc_fetch_row($value))
{

$TITEL = odbc_result($value,1);
$SUCHTEXT = odbc_result($value, 2);
$SUCHTEXT = strval($SUCHTEXT);
$BILDTEXT = odbc_result($value, 3);
$AUFNAHMEORT = odbc_result($value, 4);
$AUFNAHMEDATUM = odbc_result($value, 5);
$LAGERORT = odbc_result($value, 6);
$FIRMA = odbc_result($value, 7);
$DATAFILE = odbc_result($value, 8);
$PREVIEW="$DATAFILE.jpg";

echo &quot;<table width=97% align=center border=0>&quot;;
echo &quot;<tr><td>&quot;;
echo &quot;<table width=100% align=center border=0>&quot;;
echo &quot;<tr><td>&quot;;
echo &quot;<tr><td width=30% valign=left><img width=91% border=2 src=temp/$PREVIEW align=top></td>&quot;;
echo &quot;<td width=70% rowspan=3 colspan=2><textarea rows=13 name=BILDTEXT VALUE=$BILDTEXT&nbsp; cols=71></textarea></td></tr>&quot;;
echo &quot;<tr><td width=30%><a1><input type=text name=TITEL VALUE=$TITEL&nbsp; size=30%></a1>&quot;;
echo &quot;<tr><td width=30%><a1>Bildtitel</a1></td></tr>&quot;;
echo &quot;<tr><td width=30%>&nbsp;</td><td colspan=2 width=70%><a1>Beschreibungstext zum Bild</a1></td></tr>&quot;;
echo &quot;<tr><td width=30%><a1><input type=text name=AUFNAHMEORT VALUE=$AUFNAHMEORT&nbsp size=30%></a1></td>&quot;;
echo &quot;<td width=30%><a1><input type=text name=AUFNAHMEDATUM value=$AUFNAHMEDATUM&nbsp; size=30%></a1></td>&quot;;
echo &quot;<td width=40%><a1><input type=text name=SUCHTEXT value=$SUCHTEXT&nbsp; size=40%></a1></td></tr>&quot;;

echo &quot;<tr><td width=30%><a1>Aufnahmeort</a1></td><td width=30%><a1>Aufnahmedatum&nbsp;(dd/mm/yyyy)</a1></td>&quot;;
echo &quot;<td width=30%><a1>Suchtext</a1></td></tr>&quot;;
}
 
Hi

I found the Solution for my Problem

To Display in HTML TD i used '$VALUE' instead of $VALUE and it works.
After this to submit the form i remove the blanks with rtrim, because the $VALUE is 48 Characters long ( As the DB field ).

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top