[PHP] Missing Var

2004-01-29 Thread Nicholas Fitzgerald
Running Red Hat Fedora 1, latest updates. MySQL 3.23.58 PHP 4.3.4 Apache 
2.0.48.
Uploaded file info not showing up where it's supposed to. Here's the 
scenario:

Here is my "form header":
   
   
   
   
   

Here is the input field where it gets the filename:
   
Here is the PHP code that executes this:
if($newfile){
   $uploaddir = "/home/nick/http/homepage/userfiles/";
   $uploadfile = $uploaddir . $_FILES['$finame']['name'];
   if(move_uploaded_file($_FILES['$finame']['tmp_name'], $uploadfile)){
   $finame = basename($finame);
   $sql = mysql_query("INSERT INTO files SET 
filename='$finame', owner='$fiowner', description='$fidesc'");
   }
   else{
   echo " File Upload 
Failed.";
echo "";
   }
}

Here is the resulting $_FILE values:
   Array ( [finame] => Array ( [name] => brian.txt [type] => text/plain 
[tmp_name] => /home/nick/dump/phpTFCF0R [error] => 0 [size] => 1627 ) )

Here is the resulting $uploadfile value, and the problem:
   /home/nick/http/homepage/userfiles/
Now, I took this code, as you might recognize parts of it, right from 
PHP.NET in the part of the manual about "post method uploads". I can't 
for the life of me figure out why the filename is not being returned to 
that string. Any thoughts?

Nick

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


Re: [PHP] [php] search.php

2004-01-29 Thread Nicholas Fitzgerald
Try Axel Search at http://www.geocities.com/nfzgrld

[EMAIL PROTECTED] wrote:

hi,
ASP seek is not ASP i doubt if the author of ASPSeek has ever written 
a single line of code in ASP. he is a damn good c programmer though. 
(btw aspseek is based on mnogo anyway)

mnogo has a PHP api. and there is nothing in the manual that says you 
cannot restrict it to one website :-)

all the best



John Taylor-Johnston wrote:

Raditha,
mnogsearch spans sites and aspseek is ASP. I was hoping for something 
simple in PHP <|:(
J

Raditha Dissanayake wrote:

 

grep
htdig
mnogsearch
aspseek
google appliance
John Taylor-Johnston wrote:

  

I want to create an old fashioned search function that will look in 
*.htm and *.html files above /home/user/public_html and return a 
URL. Anything handy ? Haven't done or seen something like that 
since my Perling days.

John


 



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