Page 1 of 1

php code runs twice .....

Posted: Thu Aug 18, 2005 1:33 am
by bskhas
Hi everyone ...

I am facing a problem. I have written a code of inserting data into database, when that page is loaded, it inserts the data successfully into the database, but not only once ... TWICE. Although i have written the query just once.

Can anybody help why this happens ?

Thanx ...

POST CODE

Posted: Thu Aug 18, 2005 2:19 am
by AnarKy
HI,

Please post your code,
it may be a simple bug. :wink:

Posted: Thu Aug 18, 2005 3:36 am
by s.dot
use a die(); at the end of the code.

Although, you should really debug your script instead of cheating like I would :-D

Posted: Thu Aug 18, 2005 6:44 am
by raghavan20
I hv come across this problem earlier but sadly I dont remember wot I did to cure that one :cry:

shd be a problem with the form submitting twice because of sth...pls post your code :)

Posted: Thu Aug 18, 2005 7:04 am
by BDKR
Could be an extra iteration in a loop. There would really be no way of knowing until there were eyes on code.