alexguz79 Posted April 17, 2008 Share Posted April 17, 2008 Hey people.... need this to work.... and after more than 20 hours... i can't... any help? after the search i get results.... thats ok.... the problem comes when i try to display the image on the DDBB with that search.... just get the binary code... i also want thata image to link this is my code <?php if( isset ($resultmsg)){ echo $resultmsg; exit(); }else{ echo "Resultados de tu búsqueda: " . $var; } foreach($newarr as $value){ $query_value = "SELECT * FROM perfect WHERE id = '$value'"; $num_value=mysql_query ($query_value); $row_linkcat= mysql_fetch_array ($num_value); $row_num_links= mysql_num_rows ($num_value); $titlehigh = preg_replace ( "'($var)'si" , "<b>\\1</b>" , $row_linkcat[ 'nombre_evento' ] ); $linkhigh = preg_replace ( "'($var)'si" , "<b>\\1</b>" , $row_linkcat[ 'nombres' ] ); $linkimg = preg_replace ( "'($var)'si" , "<b>\\1</b>" , $row_linkcat[ 'img_portada' ] ); $contenttype = preg_replace ( "'($var)'si" , "<b>\\1</b>" , $row_linkcat[ 'FileType' ] ); foreach($trimmed_array as $trimm){ if($trimm != 'b' ){ $titlehigh = preg_replace( "'($trimm)'si" , "<b>\\1</b>" , $titlehigh); $linkhigh = preg_replace( "'($trimm)'si" , "<b>\\1</b>" , $linkhigh); $linkimg = preg_replace( "'($trimm)'si" , "<b>\\1</b>" , $linkimg); $contenttype = preg_replace( "'($trimm)'si" , "<b>\\1</b>" , $contenttype); } ?> </span> <p> <span class="styleform"> <?php header("Content-type:$contenttype"); ?> <?php echo '<img src=' . $linkimg . ' alt="" width="100" height="70" border="0"></a>'; ?> <?php echo $titlehigh; ?><br> <?php echo $linkhigh; ?><br><br> </span></p> <span class="styleform"> <?php } //end foreach $trimmed_array if($row_num_links_main > $limit){ if ($s>=1) { // do not display previous link if 's' is '0' $prevs=($s-$limit); echo "<div align='left'><a href='$PHP_SELF?s=$prevs&q=$var&catid=$catid'>Anterior " .$limit. "</a></div>"; } $slimit =$s+$limit; if (!($slimit >= $row_num_links_main) && $row_num_links_main!=1) { $n=$s+$limit; echo "<div align='right'><a href='$PHP_SELF?s=$n&q=$var&catid=$catid'>Siguiente " .$limit. "</a></div>"; } } } ?> Quote Link to comment Share on other sites More sharing options...
alexguz79 Posted April 17, 2008 Author Share Posted April 17, 2008 the image is stored in the ddbb Quote Link to comment Share on other sites More sharing options...
Julian Posted April 17, 2008 Share Posted April 17, 2008 Hi you're missing the quotes (") <?php echo '<img src='"' . $linkimg .'"' alt="" width="100" height="70" border="0"></a>'; ?> Quote Link to comment Share on other sites More sharing options...
JSHINER Posted April 17, 2008 Share Posted April 17, 2008 Hi you're missing the quotes (") <?php echo '<img src='"' . $linkimg .'"' alt="" width="100" height="70" border="0"></a>'; ?> Not cool to find that out after 20 hours :-\ Glad it wasn't me! Quote Link to comment Share on other sites More sharing options...
discomatt Posted April 17, 2008 Share Posted April 17, 2008 Eh, I don't think that's the issue here. You have to make an entirely different script to serve the image, then link to that script with the img src attrib. Quote Link to comment Share on other sites More sharing options...
alexguz79 Posted April 18, 2008 Author Share Posted April 18, 2008 thanks.... ill try the one from JSHINER first.... and hope that works.... if not... ill try something else.... but yeah... its hard after 20 hours Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.