Form Action?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ut1205
Forum Commoner
Posts: 32
Joined: Thu Jan 29, 2004 5:12 pm

Form Action?

Post by ut1205 »

I've always had my "form page" and "form action" page in the same folder but I'm trying something different and can't get it to work. My "index.php form page" is the main folder but the "form action" page is in a different folder. They are both in the same "main" folder. I have tried:

<FORM ACTION="allsapitems/HandleItem.php" METHOD=Post>

to try to get it to open the "allsapitems" folder but it doesn't work. It wants to go straight to "HandleItems.php" in the main folder which doesn't exist.

What am I doing wrong.
Draco_03
Forum Regular
Posts: 577
Joined: Fri Aug 15, 2003 12:25 pm
Location: Montreal, Canada

Post by Draco_03 »

can you give me the structure of your folders plz
Still this might help you, if you have this structure in your root

Code: Select all

&#1111;root]
---------
&#1111;images]
           -some_img.jpg
&#1111;includes]
&#1111;confirm]
            -form_action.php
form_page.php
so the code should be

Code: Select all

<form method="post" action="confirm/form_action.php">
ut1205
Forum Commoner
Posts: 32
Joined: Thu Jan 29, 2004 5:12 pm

File Structure

Post by ut1205 »

[root] folder named "onestop"

-----------------------------------

[subfolder1] folder named "allsapitems"
within this folder "handleitem.php" (this is where I'm going)

[subfolder 2] folder named "sapvendors"

[subfolder 3] folder named "phonedirectory"

My index.php page uses a table with 3 sections. Each section contains the "form" page for one of the three above subfolders. What I'm trying to do is allow my users to access their choice of these three php/mysql programs from one page. I can't get "form action" to open up subfolder 1 and open "handleitem.php.

Thanks for the response.
User avatar
dull1554
Forum Regular
Posts: 680
Joined: Sat Nov 22, 2003 11:26 am
Location: 42:21:35.359N, 76:02:20.688W

Post by dull1554 »

try
<FORM ACTION="../allsapitems/HandleItem.php" METHOD=Post>
ut1205
Forum Commoner
Posts: 32
Joined: Thu Jan 29, 2004 5:12 pm

Will try Tomorrow

Post by ut1205 »

I'll give it a try when I get back to work tomorrow. I believe I have already tried that and it didn't work.

When I fill in the form and hit submit it gives me "This page cannot be displayed......" If you look at the url in the address box it drops any path I put in and shows "onestop/handleform.php". It doesn't even try to open the sub folder. This would be fine if "handleform" was in "onestop" (root) directory but its not and I don't want to put the files for all three programs in one folder.

Thanks for the reply!
Post Reply