All,

I need some help with this current feature I am working on.  I want 
users to be able to upload Rich Text and Rich Text only files.  
Currently, I do not know how to do this with anything other than 
pictures.  Can anyone tell me the proper way.  I have the following 
code set up for user to upload photos, but I would prefer it Rich 
Text only files.

Also, the code I got from a book shows only how to upload a file to 
my own computer.  I am trying to upload it to the website using the 
absolute path.  I first wrote the author with this simple question, 
but she did not reply.  Perhaps someone in here can help me.

Here's the code:

<?php

  
        if(!isset($_POST['Submit Article']))
        {
                include("submit_article.php");
        } # endif
        else
        {
                if($_FILES['pix']['tmp_name'] == 'none')
                {
                        echo "File did not upload.";
                        include("submit_article.php");
                        exit();
                }
                if(!ereg("image",$_FILES['pix']['type']))
                {
                        echo "File is not Rich Text.";
                        include("submit_article.php");
                        exit();
                }
                else
                {
                        $destination 
= '/.../articles/submissions'."/".$_FILES['pix']['name'];
                        $temp_file = $_FILES['pix']['tmp_name'];
                        move_uploaded_file($temp_file,$destination);
                        header("Location: /reviewers/home.php");

                }
        }               
    
?>  

So, above the absolute path that I provided from the hosting company 
was replaced with '...', however, they didn't provide anything 
before the first '/' for the destination.  What do I put there?  
Also, after this line...

= '/.../articles/submissions'."/".$_FILES['pix']['name'];

After the word submissions, I know this is wrong, but I don't know 
what to put.  The $_FILES['pix']['name']; part is correct, but I 
don't know about the last quotation and /.

Can someone help me through this.

I appreciate it much.

Jeff





The php_mysql group is dedicated to learn more about the PHP/MySQL web database 
possibilities through group learning.  
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php_mysql/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to