Results 1 to 2 of 2

Thread: php with wml for loading image

  1. #1
    Join Date
    Jun 2008
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Angry php with wml for loading image

    I'm developing a wap site with wml and php.
    my php code is retrievig and displaying blob image from database.
    but i cannot include any wml part to this page.
    actually i want to display image from database with some links.
    is it possible ? plz help me....


    my php code is....

    <?php
    function db_connect($user='root', $password='admin', $db='example')
    {
    mysql_connect('localhost', $user, $password) or die('I cannot connect to db: ' . mysql_error());
    mysql_select_db('example');
    }
    db_connect();
    $sql = "select imgdata from pix where title=2";


    $result = mysql_query("$sql");
    while($row = mysql_fetch_assoc($result))
    {
    $bytes = $row['imgdata'];
    }
    header("Content-type: image/jpeg");
    echo $bytes;
    exit ();
    mysql_close();
    ?>

  2. #2
    Join Date
    Jan 2007
    Posts
    629
    Thanks
    10
    Thanked 28 Times in 28 Posts

    Default

    See your other thread. Don't post multiple threads for the same problem.
    --Jas
    function GreatMinds(){ return "Think Like Jas"; }
    I'm gone for a while, but in the meantime: Try using my FTP script | Fight Bot Form Submissions

  3. The Following User Says Thank You to Jas For This Useful Post:

    binukjames (06-30-2008)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •