I get these errors :
Warning: fopen() expects parameter 1 to be string, array given in preview.php on line 10
Warning: filesize() [function.filesize]: Stat failed for Array (errno=2 - No such file or directory) in preview.php on line 10
Warning: fread(): supplied argument is not a valid stream resource in preview.php on line 10
Warning: getimagesize(Array) [function.getimagesize]: failed to create stream: No such file or directory in preview.php on line 11
When i submit a file from my index.php to preview.php
Code from index.php
//start
echo "<form method=post name=\"new\" onSubmit=\"return isReady(this)\" action=\"preview\" enctype=\"multipart/form-data\">";
// This is where i select the file name
</td><td width=\"80%\"><p align=\"left\"><INPUT NAME=\"fimage\" TYPE=\"file\" VALUE='Send image'> </td>
.
.
.//the submit
<INPUT TYPE=\"submit\" name=\"upload\" VALUE=\"Send File\">";
Code from preview.php
//The line that give me the errors
$data = addslashes(fread(fopen($fimage, "r"), filesize($fimage))); //line 10
Can anyone help