Jump to content

tarun

Members
  • Posts

    321
  • Joined

  • Last visited

    Never

Posts posted by tarun

  1. Ive Created A Quick Example

    But Why Doesn't It Work

    The Output I Get When I Go To: test.php?file=example.jpg Is:

    The File Type : "text/plain" Is Not Supported

     

    <?php
    $file = $_GET["file"];
    $filetype = mime_content_type('$file');
    if ( $filetype == "image/jpeg" ) {
    echo '<IMG SRC="'.$file.'">';
    }
    else {
    echo 'The File Type : "'.$filetype.'" Is Not Supported';
    }
    ?>

     

     

    Why Is It Doing This

     

    Thnx,

    Tarun

  2. I Have A PHP Code Which Loads An Image And Puts Text Over It

     

    <?
    $string = $_GET['text'];
    $r = $_GET['r'];
    $g = $_GET['g'];
    $b = $_GET['b'];
    $id = ImageCreateFromGif("img.gif");
    $yellow = ImageColorAllocate($id, 255, 255, 0);
    $white = ImageColorAllocate($id, 255, 255, 255);
    $black = ImageColorAllocate($id, 0, 0, 0);
    $colour = ImageColorAllocate($id, $r, $g, $b);
    ImageString($id, 4, 10, 20, strtoupper($string), $colour);
    ImageGIF($id,"./newimg.gif");
    ?>
    <img src="newmonkey.gif">

     

    How Do I Change The Font And The Size Of The Text

    And Any Other Things

     

     

    Thnx,

    Tarun

     

  3. This Is A Quick Example Of

    If users.txt Looked Like This

     

    user1|-|passwd1|-|32
    user2|-|passwd2|-|46
    000002|-|passwd3|-|21

     

     

    Could I Use PHP To Add This "|-|user" To Each Line

     

    And Is It Possible To Add "|-|admin" To A Specified user (user1)

     

     

    Thnx - Really Appreciated,

    Tarun

  4. My Array Which Is Stored In items.php

    Is Accesed By Pages Using include 'items.php';

    items.php Looks Like This:

    <?php
    $itemList = array(
    
    '000001'=>array('ID' => '000001','name' => 'Item 1','price' => '99.99','img' => 'images/1.jpg','cat' => 'Category 1'),
    
    '000002'=>array('ID' => '000002','name' => 'Item 2','price' => '49.99','img' => 'images/2.jpg','cat' => 'Category 2')
    
    );
    ?>

     

    And This Code Is Used To Add To The Array:

    $itemList['000003'] = array('ID' => '000003','name' => 'Item 3','price' => '69.99','img' => 'images/3.jpg','cat' => 'Category 3');

     

    But It Doesn't Change The Contents Of items.php

     

    Any Help...

     

     

    Thnx,

    Tarun

  5. This Is My QUICK Example

     

    items.php Contains The Array

    <?php
    $itemList = array(
    
    '000001'=>array('ID' => '000001','name' => 'Item 1','price' => '99.99','img' => 'images/1.jpg','cat' => 'Category 1'),
    
    '000002'=>array('ID' => '000002','name' => 'Item 2','price' => '49.99','img' => 'images/2.jpg','cat' => 'Category 2')
    
    );
    ?>

     

     

    add.php Is The Page Which Adds To The Array

    It Uses include 'items.php'; To Include The Array In The File

     

    delete.php Is The Page Which Removes Things From The Array

    It Also Uses include 'items.php'; To Include The Array In The File

     

    BUT How Do I Actually Add And Remove Things To/From THIS Array

     

     

    Thnx,

    Tarun

  6. This Is A Quick Multi Dimensional Array That Ive Put Together

    <?php
    $itemList = array(
    
    '000001'=>array('ID' => '000001','name' => 'Item 1','price' => '99.99','img' => 'images/1.jpg','cat' => 'Category 1'),
    
    '000002'=>array('ID' => '000002','name' => 'Item 2','price' => '49.99','img' => 'images/2.jpg','cat' => 'Category 2')
    
    );
    ?>

     

    How Do I List The Items Info Using foreach

     

     

     

    Thnx,

    Tarun

  7. Its Not Done With JavaScript And It Counts Down Every Second And When You View The Source It Is The Same As

     

    Say The Counter Looks Like This:

    194860565 Seconds Till Christmas

     

    And The Source Code When You Click "View Source" Is Like This:

    <b><font color=red face=Verdana>194860565 Seconds Till Christmas</font</b>

     

     

    Then If You View The Source 5 seconds Later Without Resfreshing Or Doing Anything To THe Page The Source Is Like This:

    <b><font color=red face=Verdana>1948605*#*70*#* Seconds Till Christmas</font</b>
    

     

    OBVIUOSLY WIHTOUT THE *'s And #'s

     

     

     

     

    Thnx,

    Tarun

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.