Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Old 04-28-2005, 01:34 PM [Newbie] Databases
Novice Talker

Posts: 5
Trades: 0
Greetings, webmasters.

I've recently started to work with dreamweaver and I've set up a site. I have html knowledge and so, but what I really want is a database. One that'll work like this; my visitor come to the site, he or she wants to upload a picture with information such as email and description. I want this to be stored in a database.

I'm completely nulled at this subject. No idea where to begin. I just need a simple database that I can visit as administrator and look through the pictures and email addys. How do I make my site upload images and text to a database? Is there a simple code snippet to get somewhere? My host uses mysql by the way.


Any help would be really appreciated.

Thanks!

Undrium
Undrium is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-28-2005, 01:49 PM
leavethisplace's Avatar
Ultra Talker

Posts: 297
Trades: 0
Well i don't know if you want to use PHP or not, but it's the best language to use with mysql, check out this article at sitepoint.com i keep suggesting it and no one comes back with any problems.

You may find that Dreamweaver will have problems with you coding PHP.
__________________
A lie gets halfway around the world before the truth has a chance to get its pants on. - Sir Winston Churchill

Please visit my sites:
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
leavethisplace is offline
Reply With Quote
View Public Profile
 
Old 05-01-2005, 12:46 PM Continue
Novice Talker

Posts: 5
Trades: 0
Allright, I've followed the help in there.. and I've come this far;


-----------------------------------------------------------------------------------

<form action="sendmail.php" method="post" enctype="multipart/form-data">
<p>Email:
<input name="email" type="text" />
</p>
<p>
<input type="file" name="file">
<br />
Message:<br />
<textarea name="message" rows="15" cols="40">
</textarea>
<br />
<input type="submit" />
</p>
</form>


-----------------------------------------------------------------------------------


sendmail.php looks like this:


-----------------------------------------------------------------------------------

<?
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;
$file =$_REQUEST['file'] ;

if (!isset($_REQUEST['email'])) {
header( "Location: http://www.mail.com/submit.htm" );
}
elseif (empty($email) || empty($message)) {
header( "Location: http://www.mail.com/submit.htm" );
}
else {
mail( "myname@mail.com", "Feedback Form Results",
$message, $file, "From: $email" );
header( "Location: http://www.mail.com/submit.htm" );
}
?>

-----------------------------------------------------------------------------------


Allright, I'm almost done. The only thing that's left is to get the file sending working. What's wrong with my code? Why won't the files get sent in the email to me? Don't bother the locations, just changed those now because of some privacy. I just wish I could get the file uploading to work
Undrium is offline
Reply With Quote
View Public Profile
 
Old 05-01-2005, 12:51 PM
Christopher's Avatar
Iced Cap

Latest Blog Post:
Cross-domain AJAX with JSONP
Posts: 3,110
Location: Toronto, Ontario
Trades: 0
Sending attachments along with you email is a little bit more complication. Try reading this on FAQTs.com.
__________________

Please login or register to view this content. Registration is FREE
- Latest Articles:
Please login or register to view this content. Registration is FREE
,
Please login or register to view this content. Registration is FREE

--
Please login or register to view this content. Registration is FREE

Christopher is offline
Reply With Quote
View Public Profile
 
Old 05-01-2005, 01:08 PM
Novice Talker

Posts: 5
Trades: 0
I'm not too sure about this, Chroder.. looks very complicated :S First; Is it a form the user is writing in to then send the information to the receiver in a mail? What do I need to put in my code to make attachments work? Thanks for the help!
Undrium is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to [Newbie] Databases
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.23583 seconds with 12 queries