Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

posting problem with action parameter !!

Status
Not open for further replies.

mnassih

IS-IT--Management
Jun 29, 2005
64
SE
My problem is :
I have a query like :
----
$query = "INSERT INTO conge (matricule, nom, responsable, de, a, approuver) VALUES ('$matricule','$nom','$resp', '$de','$a','$approuver')";

mysql_query($query) or die(mysql_error());
-----
when I use :
<form action=demapprobconge.php method="POST">
the data does not insered in the database.

but when I use :

<form method="POST"> -Without action parameter-

It works !!

please help.
 
add the following
Code:
echo $query;

just before this line

Code:
  mysql_query($query) or die(mysql_error() . "<br/>sql etait: $query<br/>");

and post the query back.
 
Result :

INSERT INTO testdate(datedeb) Values ('2007-09-09')

and It works without :
---
...
else
{

echo "<form action='demapprobconge.php' method='post'>";

}
...
---
when I stay in the same form it works, but when I add :
echo "<form action='demapprobconge.php' method='post'>";

to open a confirmation form it does not work.
 
that is to be expected since you do not have any form processing code in demapprobconge.php.
 
processing code ? what does mean ? and how can I avoid this problem ?
 
it is not a problem.

in html, the broswer sends the form values on submit to the url specified in the action parameter of the form. it is this file that must do the processing (put simply).

in your posts above, you have said that the file in your action parameter does nothing more than echo a "received" bit of text.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top