Page 1 of 1

[php] form submit doesn't work

Posted: Wed Jun 04, 2008 1:34 am
by natomiast
Helo, sorry for my english. I have i serious problem with my form. I have two sites:
First nauczyciel.php: (teacher)
http://areksmolarek.republika.pl/nauczyciel.php
second: klasa.php (class)
http://areksmolarek.republika.pl/klasa.php
This is a screenshot:
http://areksmolarek.republika.pl/temp.jpg
First, on the left pane you select a class and subject (it's application for school) and press "Wybierz" Then on one div section in nauczyciel.php is loaded klasa.php site witch contain anather form. The problem is that i can't use that form on klasa.php. It doesn't work. For exemple the sql query: (

Code: Select all

mysql_query("INSERT INTO oceny VALUES('id', 2,2)");
) doesn't work and site is disappear when you push "Dodaj oceny" button.
Thnx for you help and once again sorry for my english :D

Re: [php] form submit doesn't work

Posted: Wed Jun 04, 2008 1:41 am
by deeessay
no need to apologize as long as we get the idea :)

must be that your form in klasa.php doesn't have an "action". it is only <form method="POST" >.

yeah that should be it.... hope this helps

Re: [php] form submit doesn't work

Posted: Wed Jun 04, 2008 1:50 am
by natomiast
But whot kind of action should i put there?

Re: [php] form submit doesn't work

Posted: Wed Jun 04, 2008 3:35 pm
by Frozenlight777
probably something like

<form action="phpfile.php" method="POST">
<!-- html stuff !>
</form>

Re: [php] form submit doesn't work

Posted: Wed Jun 04, 2008 8:26 pm
by deeessay
yeah action is the attribute in the form where the page will redirect you once you click the submit button. without it, i think the page will be redirect onto itself.... just create another file and put its url in the action attribute.