Jump to content

Search the Community

Showing results for tags 'image'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Job Boards
    • Jobs
  • Community Lounge and FAQ
    • Forum News
    • Open Forum
    • New Members Forum - Start Here!
  • Entrepreneurship, Business and Marketing
    • Social Media Marketing & Web Marketing
    • Entrepreneurship
    • Career Questions - Asked and Answered
  • StudioWeb
    • StudioWeb
    • StudioWeb News
    • StudioWeb Projects
  • Programming
    • Python
    • Javascript
    • PHP
  • Web Design
    • Beginners Web Design
    • HTML/XHTML
    • Dreamweaver
    • CSS
    • Advanced Web Design
    • Business of Web Design
    • Web Design News
  • Miscellaneous
    • Cybersecurity
    • Miscellaneous Software
    • Blogs and CMS
    • Web Accessibility
    • Peer-to-Peer Reviews
    • Website Templates
    • Web Design Jobs
    • Test Forum
  • Archives
    • Beginners Web Design
    • Course: The Complete Entrepreneur
    • Web Accessibility
    • Photoshop
    • CSS
    • Forum Rules and Etiquette
    • Flash
    • ASP
    • General Programming
    • Expression Web
    • Beginners Ruby
    • Killersites University
    • Actionscript

Categories

There are no results to display.

There are no results to display.

Product Groups

  • Business & Entrepreneur Courses

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website


LinkedIn


Facebook


Twitter


AIM


Yahoo


Other


Location


Interests

Found 2 results

  1. Hello Admins and Php Freaks, I have manage to upload the image using this codes $student_id = $_POST['student_id']; $first_name = $_POST['first_name']; $last_name = $_POST['last_name']; $gender = $_POST['gender']; $date_of_birth = date("Y-m-d",strtotime($_POST['date_of_birth'])); $contact_no = $_POST['contact_no']; $grade = $_POST['grade']; $section = $_POST['section']; $LRN = $_POST['LRN']; $email1 = $_POST['email1']; $email2 = $_POST['email2']; $address = $_POST['address']; $description = $_POST['description']; $LRCardname= ""; $LRCard2name= ""; $query = "UPDATE student_information SET first_name='$first_name',last_name='$last_name',"; $query .= "gender='$gender',date_of_birth='$date_of_birth',contact_no='$contact_no',grade='$grade',section='$section',"; $query .= "LRN='$LRN',email1='$email1',email2='$email2',address='$address',description='$description'"; $query .= " WHERE student_id='$student_id'"; $result = mysql_query($query, $link_id); if(mysql_error() != null){ die(mysql_error()); } /* This block shows the start codes for the upload of the Learner Report Card. */ if($result){ if($_FILES['LRCard']['name'] != ""){ $filename = $_FILES['LRCard']['name']; $ext = strrchr($filename,"."); $LRCardname = $student_id; $LRCardname .="_". $filename; if($ext ==".jpg" || $ext ==".jpeg" || $ext ==".JPG" || $ext ==".JPEG" || $ext ==".gif" || $ext ==".GIF"){ $size = $_FILES['LRCard']['size']; if($size > 0 && $size < 5000000){ $archive_dir = "LRCards"; $userfile_tmp_name = $_FILES['LRCard']['tmp_name']; if(move_uploaded_file($userfile_tmp_name, "$archive_dir/$LRCardname")){ /* if LRC is successfully uploaded then LRC is stored in database. */ mysql_query("update student_information set LRCard='$LRCardname' where student_id='$student_id'", $link_id); $flag = "success"; if(mysql_error()!=null){ die(mysql_error()); } } else{ if(file_exists('LRCard/' . $LRCardname)) { unlink('LRCards/' . $LRCardname); } rollbackData(); } } else{ if(file_exists('LRCards/' . $LRCardname)) { unlink('LRCard/' . $LRCardname); } rollbackData(); die("You can upload LRCard of 5 MB size only. Please, try again."); } } else{ if(file_exists('LRCards/' . $LRCardname)) { unlink('LRCards/' . $LRCardname); } rollbackData(); die("You can upload LRCard of .jpg, .jpeg, .gif extensions only. Please, try again. "); } } } else{ $flag="error"; } if($flag == "success"){ mysql_query(" COMMIT "); $flag="success"; if(mysql_error() != null){ die(mysql_error()); } } Now i want to display this uploaded image with respect to a specific student with auto incremented unique number. You know Admin Ben that i always doing my best to get those codes but this time i think im lost. I want this image to be displayed on another page. Please help me this time with the codes and ill do the rest. Please and another please. I always beleive in your expertise in CRUDE.
  2. Hello there Admins, I would like to display the image on his/her profile. This is so far the codes i have made. It displays only the outline border of the image but not the student's image itself. <?php session_start(); $session_id = $_SESSION['admin_id']; if($session_id == null){ header("location:Admin_Home.php"); die(); } include 'Connect.php'; $student_id = htmlentities($_REQUEST['id'], ENT_QUOTES); $result = mysql_query("SELECT * FROM student_information where student_id='$_GET[id]'"); $data = mysql_fetch_array($result); $numRows = mysql_numrows($result); $i = 0; while($i < $numRows) { ?> <img src="display_image.php?id=<?php echo mysql_result($data,$i,"id"); ?>" width="175" height="200" <?php $i++; } ?> Please advise me how to modify these codes to make the image display. By the way this is the display_image.php i created. <?php include 'Connect.php'; $flag = ""; $student_id = htmlentities($_REQUEST['id'], ENT_QUOTES); if (IsSet($_GET['id'])){ $result = @mysql_query("select * from student_information where student_id = ".$_GET['id']); header("Content-type: image/jpeg"); header("Pragma: public"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: private",false); header("Content-Disposition: attachment; filename=\"".basename($filename)."\";" ); header("Content-Transfer-Encoding: binary"); header("Content-Type: PHP Generated Data"); header("Content-Length: ".filesize($filename)); while ($data = mysql_fetch_array($result)) { print $data['LRCard'];} mysql_free_result($result); } ?>
×
×
  • Create New...