Members: 16,996
Threads: 38,846
Posts: 159,391
Online: 26

Newest Member: Kl_broka@rediffmail.com


Odoo.tv - Outdoor Television


Sedo - Domains kaufen und verkaufen das Projekt mambers.com steht zum Verkauf Besucherstatistiken von mambers.com etracker® Web-Controlling statt Logfile-Analyse
Old 06.01.2005, 06:08   #1 (permalink)
Baby Mamber
 
Join Date: Dec 2004
Posts: 6
midlantica is on a distinguished road
Default Pic upload path insert into MySQL?

Ok, I have a form on my Mambo site that has name, size etc and uploads a pic. I get all the text stuff fine. I also get the pic fine. The pic is uploaded to path/to/file on server. But when I try my DisplayDB.php I can't get the pic to show. I know I need to save the path to the DB and then use it later to show the pic... But the path isn't showing up...

My form runs something like this:
<input type=FILE name="photo" size=20>
<input type="HIDDEN" name="uploadfile" VALUE="uploadfile">

My form handler is something like this:
$uploaddir = '/path/to/file/';
$uploadfile = $uploaddir . basename($_FILES['photo']['name']);
if (move_uploaded_file($_FILES['photo']['tmp_name'], $uploadfile)) {
echo "File was successfully uploaded.\n";
} else {
echo "Picture upload failed.\n";
}

//...
$Link = mysql_connect ($Host, $User, $Password);
$Query = "INSERT into $TableName values ('0', '$name', '$uploadfile', '$weight', '$area', '$lure_bait', '$date', '$time_of_day', '$weather', '$type_of_fishing', '$comments')";
// This bit is not working...

My DisplayDB.php runs like this:
while ($Row = mysql_fetch_array ($Result)) {
echo ("<TR ALIGN=CENTER VALIGN=TOP>\n");
echo ("<TD ALIGN=LEFT VALIGN=TOP bgcolor=\"#FFFFFF\">$Row[name]</TD>\n");
echo ("<TD ALIGN=LEFT VALIGN=TOP bgcolor=\"#FFFFFF\"><img src=\"$Row[uploadfile]\" width=\"100\" height=\"120\"></TD>\n");

I don't know what's wrong... Since I'm a bit of a noob I barely know what's right! I know this isn't really a Mambo question... but I do have a Mambo site, it's still very new, http://bigfloridafish.com. Here is the actual form: http://bigfloridafish.com/_TESTING/S...bmit_form.html

Thanks in advance...
midlantica is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Please help my hosting runs out soon! The Devil Mambo 4.5 Bugs 11 03.09.2004 21:28
Possible Error in RC1 SQL? almambo Mambo 4.5.1 Installation and Upgrades 4 28.08.2004 13:58
Insert Pic in Mamblog? Carada Template Discussions 1 22.07.2004 20:46
mysql insert query?? muppy Mambo 4.5 General Talk 3 21.06.2004 00:01
How to insert an ENLARGEABLE pic like it were a MODULE alfri Module 'How Do I' Questions 3 11.04.2004 01:30


All times are GMT +2. The time now is 13:47.

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
A vBSkinworks Design
© Copyright 2004-2008 by Arthur Konze Webdesign.