Jump to content

tarun

Members
  • Posts

    321
  • Joined

  • Last visited

    Never

Posts posted by tarun

  1. Im looking to create an onsite messaging system for users to private message each other - BUT using flatfile or php files to store data as i have limited mysql resoures

    i was wondering if anyone had any websites to visit/advice/codes as it would be GREATLY appreciated


    thanks
  2. i want to make a internal(onsite) messaging system so users can pm each other
    all user data is stored in a directory called "accounts" and the userz data is in a file like http://www.example.com/accounts/tarun.php
    and the file looks sumthin like dis

    [code]
    <?php
    $username='tarun';
    $password='testpass';
    $age='12';
    $profile='';
    ?>
    [/code]
    and mayb PMs cud b stored as $pm1 $pm2 etc in the users data file

    the users data iz accessed like dis
    eg Edit Profile Page

    [code]
    <?php
    include(accounts/$un.php);
    echo'<form action="editprofile.php"><textarea>$profile</textarea><input type=submit value=Change Profile></form>';
    ?>
    [/code]
    any1 gt any bitz ov code or a website 2 lk@ or any advice 2 say

    thnx ppl
    appreicate hlp
  3. y not try str_replace

    example
    [code]
    <?php

    $BBCode = array(
    # Bold
    '[b]' => '<B>',
    '[/b]' => '</B>',
    # Italic
    '[i]' => '<I>',
    '[/i]' => '</I>',
    # Underline
    '[u]' => '<U>',
    '[/u]' => '</U>',
    # Image
    '[img]' => '<IMG SRC="',
    '[/img]' => '">',
    # Link
    '[url=' => '<A HREF="',
    ']' => '">',
    '[/url]' => '</A>',
    # smilies
    ':)' => '<img src="/images/smilie.gif" />',
    ':(' => '<img src="/images/sad.gif" />'
    # note the missing comma after the last line above
    );

    ?>

    <?php

    function Convert_BBCode( $t )
    {
      $search = array_keys( $GLOBALS['BBCodes'] );
      $t = str_replace( $search, $GLOBALS['BBCode'], $t );
      return $t;
    }

    ?>

    <?php
    echo .Convert_BBCodes( $text ).;
    ?>
    [/code]
  4. when i use this code
    [code]<?php

    if (strstr($file, '.jpg')){
    echo ('<img src="$file">');
    }
    else {
    echo ('Unknown File Type');
    }

    ?>[/code]

    it literrily outputs <img src="$file">
    lk here to see : http://filehost.awardspace.com/test.php?file=http://www.phpfreaks.com/images/logo_main.jpg

    what wrong wid it????
  5. because b4 u click the button there is no menu and after u click the button ther is a menu displaying "Home, Shop, About, Contact, Join, Links" maby u cud try for the TD tag the valign middle eg <TD VALIGN="Middle">
  6. Hi Guys
    I want to make a thing which when the variable $file is a gif filetype it echos <img src="$file"> and when it is a mp3 <embed src="$file">(or wateva the embeded tag is 4 mp3)

    thnx ppl
    i really appreciate it
  7. Hi Guys
    I want to make a thing which when the variable $file is a gif filetype it echos <img src="$file"> and when it is a mp3 <embed src="$file">(or wateva the embeded tag is 4 mp3)

    thnx ppl
    i really appreciate it
  8. im a bit stuck with mime_content_type
    i wanna make sumthing that instead of outputting image/gif or wateva it cums up wid <img src="example.gif">

    this is wat i got so far but its wrong
    <?php
    if (mime_content_type('example.gif') == "image/gif"
    echo ("<img src="example.gif">");{
    }
    ?>

    SUM HLP please

    thnx ppl
×
×
  • 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.