Forum Moderators: coopster

Message Too Old, No Replies

PHP Form Verification & MySQL Update

Error after update

         

mvaz

1:05 pm on Jul 28, 2008 (gmt 0)

10+ Year Member



Hello, I have a form that works fine, but after submitting, verifying, it updates my database; all fine here. After updating, the form displays "Resource id #2". Could this be something to do with validation and mysql update? Please advise. Many thanks in advance.

eelixduppy

6:17 pm on Jul 28, 2008 (gmt 0)



Seems like you are echoing the contents of a resource variable as if it were regular text and what you are seeing is practically like the "toString" form of the object, which is "Resource id #2". To get rid of this, you have to find where you are echoing this variable, and do something else with it, usually it's using it in a function, not echoing it to the browser.

mvaz

8:53 pm on Jul 28, 2008 (gmt 0)

10+ Year Member



But ed, what are they? All I am doing in my form is inputs and not echoing any db results. Please help thru advise.

Oh, one more thing - when the script is run on my localhost, there isnt this error/message showing.

eelixduppy

10:17 pm on Jul 28, 2008 (gmt 0)



it should still do this on your local server and my guess is it's from the database code. Can you please share with me the code you are using with your database as this is likely where it's coming from

mvaz

10:50 pm on Jul 28, 2008 (gmt 0)

10+ Year Member



eelix, I sussed it out. You were right, I was echo'ing a variable in my include for the db connection; removed it and it works mint. thanks a lot of the insight. You guys with such vast experience and exposure, truly make our journey as easy as you can. Keep up the great work. Cheers!