473,382 Members | 1,809 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Seeming "Auto-Submit" without my creating or wanting it


I am running PHP5 in Eclipse. I downloaded HTTP_UPLOAD from
pear.php.net to play with the functionality. They have a nice example
but it is not working for me...

Here is what is happening - the example includes a form where you
select a file and submit. When I run the code, though, it acts as if
I have already pressed the submit button and I always end up with the
error "No file was provided."

The form and the php code that responds to the submit are in the same
php file and I watch as I debug and it just goes right through
everything on the page without stopping. Same when run without
debug. Same thing when running from the command line. I have also
tried separating the form into one file and the php code into
another. Same deal.

So I am wondering if there is a problem with my PHP install or
something.

Anyone have any ideas?

Thanks
Jul 21 '08 #1
2 1492
Is there a condition in the form handler code specifying that certain values
must be set before processing the form?

Maybe add a form value like <input type="hidden" name="checkit"
value="check">

Then, in the PHP code, enclose the form handler code inside the following:

if(isset($_POST['checkit']) && $_POST['checkit']=="check")
{
///// handle the form here
}

<Bo*******@gmail.comwrote in message
news:09**********************************@56g2000h sm.googlegroups.com...
>
I am running PHP5 in Eclipse. I downloaded HTTP_UPLOAD from
pear.php.net to play with the functionality. They have a nice example
but it is not working for me...

Here is what is happening - the example includes a form where you
select a file and submit. When I run the code, though, it acts as if
I have already pressed the submit button and I always end up with the
error "No file was provided."

The form and the php code that responds to the submit are in the same
php file and I watch as I debug and it just goes right through
everything on the page without stopping. Same when run without
debug. Same thing when running from the command line. I have also
tried separating the form into one file and the php code into
another. Same deal.

So I am wondering if there is a problem with my PHP install or
something.

Anyone have any ideas?

Thanks

Jul 22 '08 #2

I don't know - now its working and I have not done anything (on
purpose) to change the behavior (no wrapping if clause). Weird. This
is the hard part about working with a new language - the question is
always - is this expected, a bug, or user (developer) error.

Thanks for the response.

Bob
Jul 23 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

16
by: John Baker | last post by:
Hi: I know this is a strange question, but I have inherited a system where files are copied and records re auto numbered (as an index field) )frequently, and I am wondering how high the number...
1
by: PL | last post by:
The Culture="auto" UICulture="auto" is a great idea, but how do you handle the situaion where SQL Server always requires a dot "." in numeric values. If I use Culture="auto"so that dates and...
1
by: ComputerGuyCJ | last post by:
I have an application that I've used click-once deployment to publish out to a shared network path. From there I installed the app on a few client machines, including my own. Since then I published...
1
by: Jefferds.A | last post by:
Hi, I'm putting together a little database of individuals categorized by family. I have two lists, one that contains family names and one that contains individuals' names. When you click on a link...
9
by: Beowulf | last post by:
I was having this problem: http://groups.google.com/group/microsoft.public.sqlserver.server/msg/e36e423972323378?dmode=source with it taking an inordinate amount of time to enumerate the...
22
by: nospam_news | last post by:
I currently get asked about my usage of "auto". What is it for? The keyword is clearly superflous here. In contrast to the huge majority of C/C++ developers I write definitions very explicitly...
0
barbk
by: barbk | last post by:
Hey all, In DB2 v9 is it possible to have an auto generated number field within a primary key that is a combination of multiple fields? For example resv locn sale_no 1234 789...
2
by: Piotr K | last post by:
Hi, I've encountered a strange problem with Firefox which I don't have any idea how to resolve. To the point: I've <divelement with a style "height: auto" and I want to retrieve this value...
1
by: Laurence | last post by:
Hi, DB2/400 seems not able to auto-rollback one of transactions while dead- lock occurred. I called the procecure QSYS.CREATE_SQL_SAMPLE for creating sample database, and used ISQL (STRSQL)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.