Forum Moderators: coopster

Message Too Old, No Replies

insert data from form into mysql

         

phpNEWBE

4:09 pm on Oct 22, 2009 (gmt 0)

10+ Year Member



when i submit a form with data the data is placed into my databse correctly. Only problem is that I want to stay on the same page as my form is on. Now i get directed to the page where the INSERT INTO code is placed.

Can anyone help me out here?

code:

echo "<form method='post' value=update action=insert2.php>";

I get directed to insert2.php (it's a blanc page) but want to stay on the page where the code above is on.

rocknbil

6:52 pm on Oct 22, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome aboard phpNEWBE, here is a recent discussion [webmasterworld.com] that is about exactly this topic, putting all your functions into one script instead of multiple scripts/pages. To start, whatever your script filename is, you change the form action to that filename.

The form is an .html page, not a script? See the link above. :-)