473,395 Members | 1,972 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,395 software developers and data experts.

Communicating to server .php without using <form>

Don
I'm trying to come up with a way within a client-side web page of uploading a couple files to a
server-side PHP program without using a <form...>. I don't want to give up the page which happens
after the <form...> executes. Instead, I want to upload the files, then execute a <form...> for
another purpose. Any help would be appreciated.

Thanks, Don
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---
Jul 23 '05 #1
6 1710
Don wrote:
I'm trying to come up with a way within a client-side
web page of uploading a couple files to a
server-side PHP program without using a <form...>.
Why? Thats what a form is for.
I don't want to give up the page which happens
after the <form...> executes.
Then don't. Simply have PHP redirect back to where you want to be by
setting the appropriate Location Header.
Instead, I want to upload the files, then execute
a <form...> for another purpose.


Huh? Why not just use one form, and let it handle both. The file uploads
and "another purpose".


--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #2
Don
On Sun, 10 Oct 2004 16:04:59 -0400, Randy Webb <Hi************@aol.com> wrote:
Don wrote:
I'm trying to come up with a way within a client-side
web page of uploading a couple files to a
server-side PHP program without using a <form...>.


Why? Thats what a form is for.
I don't want to give up the page which happens
after the <form...> executes.


Then don't. Simply have PHP redirect back to where you want to be by
setting the appropriate Location Header.
Instead, I want to upload the files, then execute
a <form...> for another purpose.


Huh? Why not just use one form, and let it handle both. The file uploads
and "another purpose".


I'm not sure how to do what you propose. Maybe, I'm not making myself clear enough. Within a
client-side page I need to upload several files to a server-side PHP program running on server A,
then from within that same client-side page I need to submit some data to a different server-side
PHP program running on server B.

Thanks for your help.
Don
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---
Jul 23 '05 #3
Don wrote:
On Sun, 10 Oct 2004 16:04:59 -0400, Randy Webb <Hi************@aol.com> wrote:

Don wrote:

I'm trying to come up with a way within a client-side
web page of uploading a couple files to a
server-side PHP program without using a <form...>.


Why? Thats what a form is for.

I don't want to give up the page which happens
after the <form...> executes.


Then don't. Simply have PHP redirect back to where you want to be by
setting the appropriate Location Header.

Instead, I want to upload the files, then execute
a <form...> for another purpose.


Huh? Why not just use one form, and let it handle both. The file uploads
and "another purpose".

I'm not sure how to do what you propose. Maybe, I'm not making myself clear enough. Within a
client-side page I need to upload several files to a server-side PHP program running on server A,
then from within that same client-side page I need to submit some data to a different server-side
PHP program running on server B.


You can't do that in JS. Not easily anyway.

Have Page1 submit to Server A, then have Server A submit to server B,
get the results back and return those results to the Browser.
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #4
Don
On Sun, 10 Oct 2004 16:44:56 -0400, Randy Webb <Hi************@aol.com> wrote:
Don wrote:
On Sun, 10 Oct 2004 16:04:59 -0400, Randy Webb <Hi************@aol.com> wrote:

Don wrote:
I'm trying to come up with a way within a client-side
web page of uploading a couple files to a
server-side PHP program without using a <form...>.

Why? Thats what a form is for.
I don't want to give up the page which happens
after the <form...> executes.

Then don't. Simply have PHP redirect back to where you want to be by
setting the appropriate Location Header.
Instead, I want to upload the files, then execute
a <form...> for another purpose.

Huh? Why not just use one form, and let it handle both. The file uploads
and "another purpose".

I'm not sure how to do what you propose. Maybe, I'm not making myself clear enough. Within a
client-side page I need to upload several files to a server-side PHP program running on server A,
then from within that same client-side page I need to submit some data to a different server-side
PHP program running on server B.


You can't do that in JS. Not easily anyway.

Have Page1 submit to Server A, then have Server A submit to server B,
get the results back and return those results to the Browser.


That sounds like a good plan. Can I have Server A return the page sent back by Server B? Once
Server A accepts the file uploads it will submit a form to Server B with other information, then the
page returned by Server B needs to be returned to the client.

Also, how do I create that form in PHP which Server A will send to Server B?

Thanks, Don
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---
Jul 23 '05 #5
Don wrote:
On Sun, 10 Oct 2004 16:44:56 -0400, Randy Webb <Hi************@aol.com> wrote:


<--snip-->
Have Page1 submit to Server A, then have Server A submit to server B,
get the results back and return those results to the Browser.

That sounds like a good plan. Can I have Server A return the page sent back by Server B? Once
Server A accepts the file uploads it will submit a form to Server B with other information, then the
page returned by Server B needs to be returned to the client.

Also, how do I create that form in PHP which Server A will send to Server B?


Ask in comp.lang.php as there are people there that can tell you better
than I can. I could dig through www.php.net and find what I was looking
for but there may be a better way than what I would find.

f'up set to comp.lang.php

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq
Jul 23 '05 #6
Don
On Sun, 10 Oct 2004 17:05:29 -0400, Randy Webb <Hi************@aol.com> wrote:
Don wrote:
On Sun, 10 Oct 2004 16:44:56 -0400, Randy Webb <Hi************@aol.com> wrote:


<--snip-->
Have Page1 submit to Server A, then have Server A submit to server B,
get the results back and return those results to the Browser.

That sounds like a good plan. Can I have Server A return the page sent back by Server B? Once
Server A accepts the file uploads it will submit a form to Server B with other information, then the
page returned by Server B needs to be returned to the client.

Also, how do I create that form in PHP which Server A will send to Server B?


Ask in comp.lang.php as there are people there that can tell you better
than I can. I could dig through www.php.net and find what I was looking
for but there may be a better way than what I would find.

f'up set to comp.lang.php


Ok, I'll check with that group regarding the PHP form code. But, what are your thoughts regarding
Server A returning Server B's returned page to the client?

Thanks, Don
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---
Jul 23 '05 #7

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

Similar topics

1
by: Don | last post by:
Please ignore the previous post on this subject. Posted it to the wrong group. Here's what I meant to post: I'm trying to come up with a way within a client-side web page of uploading a couple...
2
by: Keiron Waites | last post by:
I have the following code: <input type="text" name="search" class="search_top"> <a href="" onclick="window.location='search.inc.php'+document..search. value; return false;"...
3
by: Ben | last post by:
Here's my form: <form name="aForm" method='post'> <input type=file name=file1 onkeypress='KeyPress()'><br> <a id='attachMoreLink' href='javascript:AddFileInput()">Attach More Files </a> <input...
4
by: Howard Jess | last post by:
In Opera 8.01 (Linux; Build 1204) and in Opera 7.54 (Windows XP; Build 3865), my form disappears from the HTML markup (below). To summarize: 1) In a <script> block in the <head> I create a form...
6
by: snacktime | last post by:
I've searched and searched and have not found a solution to suppress the margin on form or href tags so that there is no space before or after the tag. The only way I have found to do this is to...
4
by: rob c | last post by:
This is a minor thing and only appears in IE (so far), but I'd like to know to correct it (if possible). Whenever I use a form on a webpage, Explorer always leaves a blank line following the...
8
by: chris_fieldhouse | last post by:
Hi fairly new to php, but picking it up quite well. the question I have, is it possible for a php script which is used to validate values submitted in a form, to then post these values onto...
5
by: shotokan99 | last post by:
for instance i do have this element but i dont have a <form>: <input type="Text" name="myname" id="myname" size="30"...> then i have this link: echo'<a...
10
by: neverquit | last post by:
hi , Iam Nagesh,Begineer in using Ajax,well i have been using ajax in application, i have faced a problem while placing the responseTEXT into the <div> tag positioned inside the <form> tag iam...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.