Chesso 0 Report post Posted July 28, 2006 (edited) Within my site I have built my own basic forum using PHP/Mysql, I always test locally now both using EasyPHP and WAMP5 which both give me no problems what so ever.But when I tryed to run the exact same code on Asta's hosting services (and possible another I used to use) when creating a new thread or adding a reply to an existing one it *sometimes* adds an additional thread/reply as a Guest (someone not signed in) with an empty message.This would lead me to believe that somehow the page is being refreshed and the variables sent to the database update php file are obviously not filled in unless sent from the proper page.But why does this behaviour happen only on using web services from others and works perfect for me using a completely different version of mysql/php and the same version on my machine? Edited July 28, 2006 by Chesso (see edit history) Share this post Link to post Share on other sites
Hercco 0 Report post Posted July 28, 2006 Sounds quite strange... It must have something to do with the refresh... But what sounds so weird is that the new post is not with same username. How do you fetch the username/ID? Do you use sessions or cookies or what?And is the entire thread/reply created with one execution of a PHP file or do you create a say a thread entry to the table first and then add the contents to another table? Share this post Link to post Share on other sites
Chesso 0 Report post Posted July 28, 2006 (edited) I use sessions. The code should only ever execute once except if a user by mistake refreshed the page one or more times.I have a temporary or permanent fix now that should have been obvious to me long ago but well it's fixed. I send a few values such as message content and username, I basically just check to see if the message content is null.Users shouldn't be trying to post blank messages and such and it should mean that the data for that particular instance was not sent from the right page properly.I also managed to fix alot of other small bugs that I have been meaning to get out of the way, I just needed some time to focus on the affected code and it didn't take too long at all after that to figure out something to fix it up. Edited July 28, 2006 by Chesso (see edit history) Share this post Link to post Share on other sites
vhortex 1 Report post Posted July 29, 2006 did you check if your script uses session cookies?if configured wrongly.. it can sometimes cause weird behavior.. Share this post Link to post Share on other sites
Chesso 0 Report post Posted July 29, 2006 I use the standard session method, it's server side sessions as far as I know and not client. Share this post Link to post Share on other sites