RE: file upload with story
| From: | Tim Ward | Date: | Tue, 22 Jan 2002 09:47:54 +0000 |
| Subject: | RE: file upload with story | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-81501@lists.php.net to get a copy of this message | ||
I found everything I needed to upload images here:
http://www.php.net/manual/en/features.file-upload.php
<http://www.php.net/manual/en/features.file-upload.php>
Tim
www.chessish.com <http://www.chessish.com>
----------
From: will hives [SMTP:will@colemanmoore.com]
Sent: 21 January 2002 23:01
To: php-general@lists.php.net
Subject: file upload with story
Please can someone help, I can't find any answers anywhere....
I have this code:
<?
$db_name = "name";
$table_name = "my_contacts";
$connection = @mysql_connect("www.myserver.net", "username",
"password") or
die ("couldn't connect.");
$db = @mysql_select_db($db_name, $connection) or die ("couldn't
select
database.");
$sql = "INSERT INTO $table_name
(id, fname, lname, address1, address2, address3, postcode, country,
prim_tel, sec_tel, fax, email, birthday)
VALUES
(\"\", \"$fname\", \"$lname\", \"$address1\",
\"$address2\",
\"$address3\",
\"$postcode\", \"$country\", \"$prim_tel\", \"$sec_tel\",
\"$fax\",
\"$email\", \"$birthday\") ";
$result = @mysql_query($sql, $connection) or die ("couldn't execute
query");
?>
it's really just an online contacts book, what I want to do as have
the
ability to upload an image with the record.
Then when the contact details are viewed it shows the also uploaded
image.
How do I add that code into this...any help would be fantastic.
Cheers
Will