camkorn_666 wrote:
> 
> 
> Hello Everyone.
> 
> I am very new to php and have been studying the friends of ed book
> Dreamweaver CS3 with CSS,Ajax and php.
> 
>  >From one of the chapters I have created a feedback form which worked
> correctly sending the mail to me, the next chapter goes on to create
> an input form where users can leave comments on the website this part
> of it also works correctly. I am trying to merge the 2 in order to be
> sent an email when the user posts a comment on the website but it
> comes up with the following errors:
> 
> Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL
> result resource in ...
> Warning: mysql_free_result(): supplied argument is not a valid MySQL
> result resource in ...
> I appreciate any help at all!
> 
> Regards,
> 
> Clare Green.

It is difficult to answer without the complete code and a line number. I 
suggest pasting your full script into pastebin.com and give us the 
entire error message with the line number so we know where to look.

When it is giving the error "not a valid MySQL result resource", that 
sounds like the handle has run out of rows or you are stepping on the 
variable (resource handle) name. Are you sure there is more than one row 
being returned? If not, the first mysql_fetch_assoc will work, but the 
second one will fail because there are no more rows left to return.

Also if your resource handle is in another scope (Ie. In a function) you 
will not be able to use it outside of that scope unless you set it as a 
global.

bp



Reply via email to