[php] form submit doesn't work

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
natomiast
Forum Newbie
Posts: 5
Joined: Wed Jun 04, 2008 1:11 am

[php] form submit doesn't work

Post 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
User avatar
deeessay
Forum Commoner
Posts: 55
Joined: Sat May 24, 2008 1:02 am

Re: [php] form submit doesn't work

Post 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
natomiast
Forum Newbie
Posts: 5
Joined: Wed Jun 04, 2008 1:11 am

Re: [php] form submit doesn't work

Post by natomiast »

But whot kind of action should i put there?
User avatar
Frozenlight777
Forum Commoner
Posts: 75
Joined: Wed May 28, 2008 12:59 pm

Re: [php] form submit doesn't work

Post by Frozenlight777 »

probably something like

<form action="phpfile.php" method="POST">
<!-- html stuff !>
</form>
User avatar
deeessay
Forum Commoner
Posts: 55
Joined: Sat May 24, 2008 1:02 am

Re: [php] form submit doesn't work

Post 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.
Post Reply