[PHP] file upload problem

2002-09-05 Thread Ram K

Hey

I have a prob with my php file upload. i am using windows

my html file looks like





Upload the datafile here







my php file looks like

";
echo $file."";

@copy($file, $newfile) or $endresult = "Couldn't Copy File To 
Server";

echo $endresult;
?>


when i run i get an error
\\php2
c:\upload\a.gif
cannot upload file

any ideas why?? also i am not clear as to where the \\php2 comes 
 from

thanks in advance

regards
ram

__
Give your Company an email address like
ravi @ ravi-exports.com.  Sign up for Rediffmail Pro today!
Know more. http://www.rediffmailpro.com/signup/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Strore Data in File

2002-09-10 Thread Ram K

Hi

I want to store the data of a table in a file and read that file 
just as one would read a table. For e.g. I have a table t_data 
with cols name,number,cost and my data file data.txt would have 
the following data:
---
john,1,100
mark,2,200
spencer,3,200
---

Now on the web page when the visitor clicks on a link on "john" 
then this file (data.txt) must be read and the data should be 
displayed for "john" i.e.
name = john
number = 1
cost = 100
must be displayed

Can anyone please give me the code to parse this file and read the 
data for john and get all the data for that row. Please see that 
"john" functions as the primary key in the table

Regards
Ram


__
Give your Company an email address like
ravi @ ravi-exports.com.  Sign up for Rediffmail Pro today!
Know more. http://www.rediffmailpro.com/signup/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php