![]() |
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 .. |
Perhaps you could show some real code?
|
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. |
Ok.. I'll write the original code here ..
|
:
<form action="first.php">because of being deleted I wrote the codes as I remmember. It should have been like this... Is there any mistake? |
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.
|
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 |
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? |
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. |
ok.. thank u.
have a nice day.. |
| All times are GMT -5. The time now is 12:52 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC