Jump to content

tarun

Members
  • Posts

    321
  • Joined

  • Last visited

    Never

Posts posted by tarun

  1. New Code

     

    <?PHP
      $user = $_POST['uname'];
      $pwrd = $_POST['p1'];
      $check = $_POST['p1'];
    
      $DOCU NT_ROOT = $_SERVER['DOCUMENT_ROOT'];
    
    ?>
    <HTML>
    <HEAD>
    <TITLE>Registering your account</TITLE>
    </HEAD>
    <BODY>
    <?PHP
    if ($pwrd == $check) {
    echo '$user ,your passwords do not match, please go back and type them again';
    }
    ?>

  2. I Want To Create A PM System Using Arrays

    The Data Is Accessed Using

    include '/users/$username.php';

     

    And For Example "users/accounts/tarun.php" Would Contain An Array With All The PMs

     

    And In "inbox.php" All The Messages Would Display Probably Using "foreach"

     

    And How Would I Do All Of This AND I Would Also Like To Know How I Could Add A Message (Compose A New Message) And How To Delete A Message

     

     

    Thnx,

    Tarun

  3. Right Ive Found Both Of These (Both Are Untested By Me)

    1.

    <?
       //calculate thumb size
               $ow = imagesx($im);
               $oh = imagesy($im);
               $maxh = 100;
               $maxw = 150; 
               $new_h = $oh;
               $new_w = $ow;
    
               if($oh > $maxh || $ow > $maxw){
                   $new_h = ($oh > $ow) ? $maxh : $oh*($maxw/$ow);
                   $new_w = $new_h/$oh*$ow;
               }
    
               //create dst image
               $dst_img = ImageCreateTrueColor($new_w,$new_h);
               //resize and copy image
               ImageCopyResized($dst_img, $im, 0,0,0,0, $new_w, $new_h, ImageSX($im), ImageSY($im));    
               $function_image_new($dst_img,$galdir.$file);
    ?> 

     

     

    <?php
    $file = "test.txt"; //FILEADDRESS
    $size = "100"; //IMAGE SIZE
    $data = file($file);
    $im = @ imagecreate($size, $size) or die();
    $bc = imagecolorallocate($im, 255, 255, 255);
    $tc = imagecolorallocate($im, 0, 0, 0);
    $lines = (int) $size / 10;
    for ($t = 0; $t < $lines; $t++)
    {
       imagestring($im, 3, 4, 4, $data[$t], $tc);
       imagestring($im, 3, 4, 4 + ($t * 10), $data[$t], $tc);
    }
    header("Content-type: image/png");
    imagepng($im);
    imagedestroy($im);
    ?>

     

     

     

    Thnx,

    Tarun

  4. I Dont Think There Is A Way Of Styling The Actual Browse Button But

    You Can Try These If You Want:

     

    <style>
    <!--
    .browse{
      border : 1px #88A0C8;
      font-family: Arial
      font-size: 11px; 
      color: #003068; 
      text-decoration: none; 
      background-color: #E9EDF0
    }
    
    //-->
    </style>
    <input class="browse" name="uploadedfile" size="32" type="file" />

     

     

     

    <script type="text/javascript">
    function buttonPush (buttonStatus)
      {
      if (buttonStatus == "depressed")
    document.getElementById("pseudobutton").style.borderStyle = "inset";
      else
    document.getElementById("pseudobutton").style.borderStyle = "outset";
      }
    </script>
    <style type="text/css">
    input.hide
        {
      position:absolute;
      left:-137px;
      -moz-opacity:0;
      filter:alpha(opacity: 0);
      opacity: 0;
      z-index: 2;
        }
    
    input.red
        {
      background-color:#cc0000;
      font-weight:bold;
      color:#ffffff;
      z-index:1;
      width:75px;
      height:20px;
      font-size:10px;
        }
    </style>
    
    <!--[if IE]>
        <style type="text/css">
        input.hide
      {
          position:absolute;
          left:10px;
          -moz-opacity:0;
          filter:alpha(opacity: 0);
          opacity: 0;
          z-index: 2;
          width:0px;
          border-width:0px;
      }
        </style>
    <![endif]-->
    <input type="button" class="red" id="pseudobutton" value="Open File">
    <input type="file" class="hide" id="openssme" onmousedown="buttonPush('depressed');" onmouseup="buttonPush('normal');" onmouseout="buttonPush('phased');">

  5. Ever consider HTML?

     

    <a href="link.ext"><img src="thumb.ext" border="0" width="20" height="30"></a>

     

    Or if you wanted to echo it

     

    echo "<a href='link.ext'><img src='thumb.ext' border='0' width='20' height='30'></a>";

     

     

     

     

    I Think He Meant How To Create A Thumbnail Image Of A File Using PHP...

  6. Errmm... Just To Let You Know

    Is The Error I Get When Accessing Your Site

     

    Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (11) in /home/runnerse/public_html/require/config.php on line 28

    Unable to connect to SQL server

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