Jump to content

dmcke5

Members
  • Posts

    10
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://underwoodflying.elementfx.com/

Profile Information

  • Gender
    Male

dmcke5's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. I too am a beginner with this stuff but try using the full php tags when your echoing your variable(instead of just the <? use <?php) And that may help
  2. I use ubuntu Alot for programming at uni And i would say its definitely the best distro that i have used. (I tried a few on my desktop and laptop at home but settled on ubuntu). Im sure this is a discussion that could go on for a very long time Its like asking If Windows Or Mac is better, Theres no definite answer, its just a matter of opinion.
  3. Is It a dynamic list or a static list? (I.e Will the files be changing?) Because if not, im sure simple Href's Would do the trick.
  4. I dont think that answers my question Dathremar?... The file is stored in a mysql database as binary information, Not as a file in the file system. Or am I missing something here?
  5. Ok well after more playing with it i've got it displaying the right image size too ie: Size of file: 21.5 KB But the confusing thing is it still says Image Dimensions: 0px x 0px... I showed it too my lecturer today and he looked at it for and hour and a half and couldn't work it out. Please help, its Due on monday
  6. Ok well i tried that and it hasn't solved the problem yet... Im still presented with a white Box with the dimensions of the correct picture. When You right click and select properties this is what it gives me(incase it helps): Image Properties: Location: Http://myhost.com/mypicture Type: JPEG image Image Dimensions: 0px × 0px (scaled to 200px × 194px) Size of file: 0 KB (3 bytes) Alternative Text: cap1.jpg It wouldn't Actually be putting the image into the database wrong would it? As in somehow corrupting the data? I'm not sure what you meant by "assuming its stored in the same folder" either, as i thought it was stored in the database? If you can clarify that would be great Cheers, Daniel
  7. Hey guys im having trouble getting the data i need out of my mysql table and i was hoping someone could help Its an assignment for uni so im using some of the lecturers code, and just modifying it(so i apologize in advance for it being terribly messy). Anyway, the site is an online auction site. I have 4 rows for the images(the last 4 in the table) in my mysql table: imagedata(BLOB), imagename(Varchar(40)), imagesize(Varchar(40)), imagetype(Varchar(40)). All of which seem to receive the appropriate data when the file is submitted from the form. The problem is with viewing them, Here is the code i am using: $sql = mysql_query("SELECT * FROM items2 WHERE description LIKE '%$_POST[keywords]%' AND categoryid = $_POST[categories] OR name LIKE '%$_POST[keywords]%' AND categoryid = $_POST[categories]"); //Search database for keywords while ($row = mysql_fetch_array($sql, MYSQL_NUM)) { $min = $row[4] + 1; $output .= ("<hr><p> Item: <a href='item.php?uniqueid=$row[5]'>$row[0]</a> <br> Seller: $row[3] <br> Price: $$row[4] <br>Image: <img src='getImage.php?id=$row[5]' $row[8] alt='$row[7]'></p>"); } $end = ("</div>"); Here is getImage.php: <?php include'/export/student/s2681238/mysql/mysqlconfig.php'; include'/export/student/s2681238/mysql/mysqlconnect.php'; $id = $_GET['id']; $query = "select imagedata, imagename, imagetype, imagesize " . "from items2 where uniqueid = $id"; $result = @ mysql_query($query) or showerror(); $row = mysql_fetch_array($result); $image = $row; $data = $image['imagedata']; $name = $image['imagename']; $type = $image['imagetype']; $size = strlen($data); header("Content-length: $size"); header("Content-type: $type"); header("Content-Disposition: attachment; filename=$name"); ?> The Data that is stored in the table is as follows: imagedata: blob 21.5kb imagename: cap1.jpg imagesize: width="200" height="194" imagetype: image/jpeg The Code results in an empty white box the size of the image i'm attempting to display. Ive got absolutely no idea whats wrong with it Anyway its about 2Am here in Australia So im going to bed, hopefully ill have some good ideas by the morning Cheers, Daniel
  8. Ah ok, i think i've got the idea. Ill have to give it a try once all of my uni assignments are out of the way. Thanks For the Help, Daniel
  9. Great, thanks for the quick responses guys =) I can see how either way i do it, its going to be more difficult than i thought =P I had a thought of how i can do it but im not sure if it is going to work or not.... ill see if i can explain it. In my replies mysql table i could add another row, which is a long string containing user names, seperated by spaces. When a post is created, it automatically contains all users usernames, except the person who posted it. When the message list is viewed by the specified user, the program searches to see if that persons name is in the list for that post. If so it then shows the unread icon, it will then remove that name from the list when the user reads that post. Would this be hard to implement? Or is the other way going to be easier for me to set up?... Keeping in mind i will probably never have more than 100 users or so...(in fact, that's even probably optimistic)
  10. Hi guys i'm new here and im having the same problem. Ive spent the last few weeks writing a simple messageboard/forum type thing for my website. So far i haven't had any problems but i have users requesting that i make it so it will show notification on threads with new replies in them. I have thought about the storing time and date of each user login but from what i can tell, that doesn't solve the problem. Because, if you were to login without reading any of the unread posts, then logout, when you next login all of those posts will be marked as read because they were posted before the users last login. Please help Cheers, Daniel
×
×
  • 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.