![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Programmer
Join Date: Nov 2005
Location: Turkey
Posts: 93
Rep Power: 3
![]() |
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 .. |
|
|
|
|
|
#2 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
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 |
|
|
|
|
|
#3 |
|
PFO Founder
![]() ![]() |
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. |
|
|
|
|
|
#4 |
|
Programmer
Join Date: Nov 2005
Location: Turkey
Posts: 93
Rep Power: 3
![]() |
Ok.. I'll write the original code here ..
|
|
|
|
|
|
#5 |
|
Programmer
Join Date: Nov 2005
Location: Turkey
Posts: 93
Rep Power: 3
![]() |
<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? |
|
|
|
|
|
#6 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
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 |
|
|
|
|
|
#7 |
|
Programmer
Join Date: Nov 2005
Location: Turkey
Posts: 93
Rep Power: 3
![]() |
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 |
|
|
|
|
|
#8 |
|
Programmer
Join Date: Nov 2005
Location: Turkey
Posts: 93
Rep Power: 3
![]() |
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? |
|
|
|
|
|
#9 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
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 9:55 AM. |
|
|
|
|
|
#10 |
|
Programmer
Join Date: Nov 2005
Location: Turkey
Posts: 93
Rep Power: 3
![]() |
ok.. thank u.
have a nice day.. |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| OnlineTextEditor.Com! | Sane | Show Off Your Open Source Projects | 43 | Jun 16th, 2006 8:55 AM |
| File Mapping in Visual Basic? | bmad6 | Visual Basic .NET | 4 | May 16th, 2006 9:37 PM |
| Basic HTML Tutorial - Reuben Keeney | ReubenK | HTML / XHTML / CSS | 14 | Mar 26th, 2006 5:50 AM |
| After execution - Error cannot locate /Skin File? | wchar | Visual Basic | 1 | Mar 5th, 2005 9:04 PM |
| airport Log program using 3D linked List : problem reading from file | gemini_shooter | C++ | 0 | Mar 2nd, 2005 4:12 PM |