User Profile

Collapse

Profile Sidebar

Collapse
hanspeare
hanspeare
Last Activity: Oct 13 '14, 03:25 PM
Joined: May 19 '14
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • hanspeare
    started a topic Relational algebra expression for queries

    Relational algebra expression for queries

    Hello friends,

    I am just new to relational algebra probably a pre-step before learning SQL queries. Can you help me make the expressions of relational algebra expression for each of the following queries.
    These are the tables contained inside a bus driver database.
    • • driver( driver_id, driver_name, age, rating );
    • • bus( bus_id, bus_name, color);
    • • reserves( driver_id, bus_id, date);


    1. Find the colors...
    See more | Go to post

  • thank you very much for the patience Exequiel, finally i solve it with the help of your confirmation.
    See more | Go to post

    Leave a comment:


  • hanspeare
    replied to display the image uploaded using session id
    in PHP
    @Exequiel:

    Yes file name extensions like jpg, png, and gif are being accepted. I suspect the code

    $actual_image_n ame = time().".";

    ,,is wrong in

    time()

    becuase the time of upload and the time of display is not same,,would it matter? if it matters? Can you suggest me a filename to use for the uploaded file so that i can call and display it easily??
    See more | Go to post

    Leave a comment:


  • hanspeare
    replied to display the image uploaded using session id
    in PHP
    hi Exequiel,

    I tried your codes but it shows me errors and the rest of the page wont display. i revised it and this is my complete codes now. A working page but the image still wont display.

    Code:
    <?php 
    $actual_image_name = time().".";
    mysql_query("UPDATE users SET profile_image='$actual_image_name' WHERE student_id='{$_SESSION['user_id']}'",$link_id);
    echo "<img src='uploads/".$actual_image_name."'
    ...
    See more | Go to post

    Leave a comment:


  • hanspeare
    started a topic display the image uploaded using session id
    in PHP

    display the image uploaded using session id

    I have uploaded an image using the student_id as its filename. The student id is auto-incremented and unique per student_id. Now i am confused why it gives me problem to display it. I have tried.

    Code:
      <?php print '<img src="uploads/'.$session_id.'" />' ?>
    
      <?php print '<img src="uploads/'.$session_id.".".$ext'" />' ?>
    
      <?php print '<img
    ...
    See more | Go to post

  • hanspeare
    replied to Renaming uploaded photo
    in PHP
    thank you exequiel..
    See more | Go to post

    Leave a comment:


  • hanspeare
    started a topic Renaming uploaded photo
    in PHP

    Renaming uploaded photo

    Hello bytes,

    I have manage to create codes that could upload a image that is purposely to serve as profile picture of a certain student. My problem is how to rename it to aN AUTO COLLATE UNIQUE ID NUMBER so that i can display it specifically to a certain student account which bears the unique id number. The variable is $student_id.

    Code:
    <?php
        session_start();
        $session_id = $_SESSION['user_id'];
    ...
    See more | Go to post

  • Warning: Header may not contain more than a single header, new line detected in C:\xa

    Hi there,

    i have recieved this notice

    Warning: Header may not contain more than a single header, new line detected in C:\xampp\htdocs \a\Student_Edit _Handler.php on line 53

    and these are my codes. Kindly help me to fix this.
    Code:
    <?php
    	session_start();
    	$session_id = $_SESSION['user_id'];
    	if($session_id == null){
    	   header("location:Student_Edit.php");
    ...
    See more | Go to post

  • hanspeare
    replied to Undefined index: learner_id
    in PHP
    @Bharat383

    Yes already did.
    See more | Go to post

    Leave a comment:


  • hanspeare
    started a topic Undefined index: learner_id
    in PHP

    Undefined index: learner_id

    I have made this codes that registers the students using their learner id. And of course i wanted to make sure that there will be no duplication of learner id as students registered.Thes e are my codes.
    Code:
    	/*
    		This block is used to check whether the student_id already exists in database. 
    	*/
    	$select_query="select student_id from student_information where learner_id = '$learner_id'";
    	$result_set
    ...
    See more | Go to post

  • hanspeare
    replied to Error in updating learner information
    in PHP
    hello dormilich,

    thank you for the reply.
    It dont give me any notifications but it wont just update.
    But anyways, i already solve it my own dormilich.

    See you in my next problem to encounter.
    See more | Go to post

    Leave a comment:


  • hanspeare
    started a topic Error in updating learner information
    in PHP

    Error in updating learner information

    Hello everyone,

    I am confused with these little codes why it keeps error in updating the learner information. These are my codes so far.
    These are the bits of Student_Info.ph p which i think would be useful in my query.

    Code:
    <?php  if(!empty($_GET['flag']) && $_GET['flag'] == "success") { ?>   
            <span class="stylered style1"><span class="style5">Learner
    ...
    See more | Go to post

  • hanspeare
    replied to Log In Student With Unique Id
    in PHP
    Hello android app,

    i suppose your not only that android app. Maybe that is what i am missing.

    I would be delighted if you help me to make that session and declared that student_id variable.

    Please modify my codes. I dont really have an idea where to start with that except for what i have posted.
    Please :-(
    See more | Go to post

    Leave a comment:


  • hanspeare
    started a topic Log In Student With Unique Id
    in PHP

    Log In Student With Unique Id

    Good day Admins,

    I have now variables

    $learner_id
    $student_paswor d

    The learner_id and student_passwor d are being used as their log in accounts. While the student_id is being used as their unique id and it is auto-incremented.

    Here are my codes.

    Student_login_h andler.php

    Code:
    <?php
    session_start();
    include 'Connect.php';
    ...
    See more | Go to post

  • hanspeare
    started a topic How to add script :"Are you sure to delete data?"
    in PHP

    How to add script :"Are you sure to delete data?"

    Hello PHP Friends,

    I think this is just if else statement problem but im kinda lose to it.
    The whole code is succesful in deleting the data from database the problem is i wanted to put a script that remind the user if he/she really sure to delete the data. By the way this is the script.

    Code:
    <?php
    
    	// connect to the database
    	 	include 'Connect.php';
    	
    	// confirm that
    ...
    See more | Go to post

  • hanspeare
    replied to Display an image from database
    in PHP
    so does it mean there is nothing wrong woth my codes or i need to add some headers or modified it?
    See more | Go to post

    Leave a comment:


  • hanspeare
    replied to Display an image from database
    in PHP
    Thanks i will check that link im sure it will add to my learnings.
    See more | Go to post

    Leave a comment:


  • hanspeare
    replied to Display an image from database
    in PHP
    Hi Dormilich,

    It shows no error but a broken image on the upper right.
    What does it signifies?
    See more | Go to post

    Leave a comment:


  • hanspeare
    replied to Display an image from database
    in PHP
    Hi Dormilich,

    I have followed your advise but it still doesn't display. The dimension is there but the picture is broken.


    nevertheless, you’re still susceptible to SQL Injection and you use the deprecated mysql functions.


    What do you mean by this? Please advise.
    See more | Go to post
    Last edited by hanspeare; May 20 '14, 12:36 PM. Reason: supposedly not code but qoute

    Leave a comment:


  • hanspeare
    started a topic Display an image from database
    in PHP

    Display an image from database

    Hello everyone,

    I want to display an image on the webpage which was uploaded and stored in the database.

    Here is my HTML codes
    Code:
    <img src="getImage.php?id={$student_id} <?php echo $data["LRCard"]?>;" width="175" height="200" />
    and here is my getImage.php codes

    Code:
    <?php
      include 'Connect.php';
    ...
    See more | Go to post
No activity results to display
Show More
Working...