Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Aug 2nd, 2006, 8:38 AM   #1
boraciner
Programmer
 
boraciner's Avatar
 
Join Date: Nov 2005
Location: Turkey
Posts: 93
Rep Power: 4 boraciner is on a distinguished road
Question a basic question about using forms in html file

I'm not experianced in php this is why ,I have a question about using forms..
When I put two form actions (<forma action> .. </form> ) in a html file.. Although I press the second's button ,It moves to first php file using first form action ..

How can I do it ?
is using two "form action" in a html file true?

Thanks a lot ..
boraciner is offline   Reply With Quote
Old Aug 2nd, 2006, 9:11 AM   #2
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Perhaps you could show some real code?
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Aug 2nd, 2006, 10:07 AM   #3
big_k105
PFO Founder

 
big_k105's Avatar
 
Join Date: Mar 2004
Location: Fargo, ND
Posts: 1,667
Rep Power: 10 big_k105 is on a distinguished road
Send a message via AIM to big_k105 Send a message via MSN to big_k105 Send a message via Yahoo to big_k105
if you have it setup like this

[html]<form action="somefile.php?do=firstForum" method="POST">
<input type="submit" />
</form>

<form action="somefile.php?do=secondForm" method="POST">
<input type="submit" />
</form>[/html]

When it goes into the php file it should go to the place where your looking for $_REQUEST['do'] is equal to secondForm and not to the part that is looking for firstForm. Other then that I really can't help much until you show us the code you are using, that isn't working.
__________________
BIG K aka Kyle
Programming Forums
Kyle K Online

Please do not PM or email me programming questions. Post them in the forums instead.
big_k105 is offline   Reply With Quote
Old Aug 3rd, 2006, 2:22 AM   #4
boraciner
Programmer
 
boraciner's Avatar
 
Join Date: Nov 2005
Location: Turkey
Posts: 93
Rep Power: 4 boraciner is on a distinguished road
Ok.. I'll write the original code here ..
boraciner is offline   Reply With Quote
Old Aug 3rd, 2006, 3:00 AM   #5
boraciner
Programmer
 
boraciner's Avatar
 
Join Date: Nov 2005
Location: Turkey
Posts: 93
Rep Power: 4 boraciner is on a distinguished road
<form action="first.php">
<input type="text" name="a" >
<input type="submit" value="submit" name="submit">
</form>


<form action="second.php">
<input type="text" name="b" >
<input type="submit" value="submit" name="submit">
</form>


because of being deleted I wrote the codes as I remmember. It should have been like this...

Is there any mistake?
boraciner is offline   Reply With Quote
Old Aug 3rd, 2006, 7:55 AM   #6
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
That works. Personally, I wouldn't name my submit buttons the same, but that's just me. Perhaps you're not describing your problem correctly. The quality of your answers is going to depend on the quality of your question. "The code that didn't work MIGHT have been this" doesn't really hack it. Your method is by default, GET, not POST.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Aug 3rd, 2006, 9:36 AM   #7
boraciner
Programmer
 
boraciner's Avatar
 
Join Date: Nov 2005
Location: Turkey
Posts: 93
Rep Power: 4 boraciner is on a distinguished road
ok.. you're right It works.. I tried on my laptop a few days ago but It didn't work.. I'm using my desktop now..
thank you

I guess ,apache server on my laptop doesn't work correctly
boraciner is offline   Reply With Quote
Old Aug 3rd, 2006, 10:15 AM   #8
boraciner
Programmer
 
boraciner's Avatar
 
Join Date: Nov 2005
Location: Turkey
Posts: 93
Rep Power: 4 boraciner is on a distinguished road
I tried these codes on my laptop again.. It didn't work again .. how can I change php.ini file ?
what should I do to work this code?
boraciner is offline   Reply With Quote
Old Aug 3rd, 2006, 10:44 AM   #9
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
I don't know, I'm not sitting in your chair. Have you considered running a diff on your various .ini files?

EDIT: Please do not PM me with a copy of your post. Private solutions defeat the purpose of the forum.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers

Last edited by DaWei; Aug 3rd, 2006 at 10:55 AM.
DaWei is offline   Reply With Quote
Old Aug 3rd, 2006, 12:19 PM   #10
boraciner
Programmer
 
boraciner's Avatar
 
Join Date: Nov 2005
Location: Turkey
Posts: 93
Rep Power: 4 boraciner is on a distinguished road
ok.. thank u.

have a nice day..
boraciner is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
OnlineTextEditor.Com! Sane Show Off Your Open Source Projects 43 Jun 16th, 2006 9:55 AM
File Mapping in Visual Basic? bmad6 Visual Basic .NET 4 May 16th, 2006 10:37 PM
Basic HTML Tutorial - Reuben Keeney ReubenK HTML / XHTML / CSS 14 Mar 26th, 2006 6:50 AM
After execution - Error cannot locate /Skin File? wchar Visual Basic 1 Mar 5th, 2005 10:04 PM
airport Log program using 3D linked List : problem reading from file gemini_shooter C++ 0 Mar 2nd, 2005 5:12 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:24 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC