Jump to content

rajeshrhino

New Members
  • Posts

    4
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

rajeshrhino's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. print is a function whereas echo is a language construct...but they're basically an alias of one another for the most part. and echo has the slight performance advantage because it doesn't have a return value. however the main difference is echo() can take multiple expressions whereas print() cannot take multiple expressions.
  2. After the login is successful, you would be knowing the 'id' of the logged in user.Just use the below code after checking the login $user_result = mysql_fetch_assoc(mysql_query("select user_type from users where id='$userid'")); // here $userid is the 'id' of the successfully logged in user. if($user_result['user_type']=='director') header("Location:directorindex.php"); else if($user_result['user_type']=='sa') header("Location:saindex.php"); else if($user_result['user_type']=='programmer') header("Location:programmerindex.php"); hope this would solve your problem.
  3. rajeshrhino

    Iframe HELP

    seems its working in FF also . Please check it again .  i tested the following code in FF & its working . <iframe src='phpinfo.php' width=100% height=200 bgcolor='#000000' id='picdiv' scrolling=no FRAMEBORDER=0 allowtransparency="true"></iframe>
  4. Your HTML page : ----------------- <form name='file_upload' method='POST' action='Upload.php' enctype='multipart/form-data'> <input type='file' name='file'> <input type='submit' name='Upload' value='Upload'> </form> Upload.php ----------- <?php if($_POST['Upload']) {     if(isset($_FILES[file][tmp_name]) && $_FILES[file][error]=='0') {           if($_FILES[file][type]=='image/pjpeg' || $_FILES[file][type]=='image/x-png') {               if($_FILES[file][size]<'1048576')  {                                   $src = $_FILES[file][tmp_name];                     $des = $_FILES[file][name];                     if(!move_uploaded_file($src,$des)) {                         if(!copy($src,$des)) {                               echo "Unable To Upload File!";                         }                     }               }               else {                     echo "Upload Images less than 1 Mb size only";               }           }           else {               echo "Can Upload only JPG & PNG Images";           }     } } ?>
×
×
  • 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.