Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Feb 2003
    Posts
    1
    Member #
    622
    Hi all, I'll hope you help me on this, cause I'm getting crazy!
    I got a script that searchs in database the string that is giving as argument, after the string is searched in DB, it gives some results formated like this example.
    ($string=1987)

    Code |Artist |Tecnic |Year_painted |Dimension |State Image
    001 |Johnny |Oil |1987 |345X23cm. |Good |View_Image
    134 |Freddy |Pencil| 1987| 345X45cm.| Bad| View_Image

    right now the script is working perfect, but where says "View_Image" I'll like to link it to a POPWINDOW, where you can see the respective search image.

    Now take a look of the script and maybe one of you could help me to get it done.

    [PHP]

    <?
    require("../aut_verifica.inc.php");
    $nivel_acceso=10; // Nivel de acceso para esta página.
    if ($nivel_acceso <= $_SESSION['usuario_nivel']){
    header ("Location: $redir?error_login=5");
    exit;
    }
    if (!$string) {
    header('location: ./index.php');
    }
    include('search.inc.php');

    <?
    $con= @mysql_connect("$host","$huser","$hpass") or die ("Cannot connect to MySql.");
    $db = @mysql_select_db($dbn,$con) or die ("Cannot select the $dbn database.<br>Please check your details in the config.php file and try again");
    $stmt=mysql_query("select * from $tb2 where $field_name like '%$string%' ");
    ?>
    <html>
    <head>
    <title>- Search</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <body>
    <table width="85%" border="1" align="center" cellpadding="4" cellspacing="0" bordercolor="#CCCCCC">
    <tr>
    <td><b>Inventario></td>
    <td>Artista</td>
    <td>Tecnica</td>
    <td>Anno Dipinto</td>
    <td>Dimensione</td>
    <td>Stato Conservazione</td>
    <td>Image</b></td>
    </tr>
    <?


    while ($resultados =mysql_fetch_array($stmt)) {
    $inventario = $resultados[codenum];
    $artista = $resultados[artist];
    $tecnica = $resultados[tecnica];
    $yearpainted= $resultados[yearpainted];
    $dimension = $resultados[dimension];
    $conserva = $resultados[conserva];
    $picture = $resultados[picture]; //The path to de image is: ./pimg/image.jpg
    $trimmed= trim($picture, "./");
    echo "<tr>
    <td>$inventario</td>
    <td>$artista </td>
    <td>$tecnica </td>
    <td>$yearpainted </td>
    <td>$dimension </td>
    <td>$conserva</td>
    <td><a href=\"#\" onclick=\"java script:window.open('view_image.php?$trimmed', 'Image', 'directories=0, height=320, location=3, resizable=1, scrollbars=1, toolbar=0, width=345'); return false;\">View Picture</a></td>
    </tr>";
    }
    ?>


    </table>


    </body>
    </html>

    [PHP]

    How do I make that the image shows in the new popWindow?

    Thank you very much!

  2.  

  3. #2
    Guest
    I found these threads that look to be similar to yours. Do any of them help?



    If they don't a human will be along soon anyway to help you out more.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 04:43 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com