|
|
|
|
![]() ![]() |
Jul 28 2006, 12:22 PM
Post
#1
|
|
|
Teh Coder Group: Members Posts: 1,053 Joined: 18-April 06 From: Australia Member No.: 12,833 myCENTs:89.25 |
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? This post has been edited by Chesso: Jul 28 2006, 12:23 PM |
|
|
|
Jul 28 2006, 04:38 PM
Post
#2
|
|
|
Super Member Group: Members Posts: 595 Joined: 4-September 04 Member No.: 228 |
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? |
|
|
|
Jul 28 2006, 10:21 PM
Post
#3
|
|
|
Teh Coder Group: Members Posts: 1,053 Joined: 18-April 06 From: Australia Member No.: 12,833 myCENTs:89.25 |
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. This post has been edited by Chesso: Jul 28 2006, 10:23 PM |
|
|
|
Jul 29 2006, 03:53 AM
Post
#4
|
|
|
Guilty Until Proven Innocent Group: Members Posts: 372 Joined: 13-April 05 Member No.: 3,937 |
did you check if your script uses session cookies?
if configured wrongly.. it can sometimes cause weird behavior.. |
|
|
|
Jul 29 2006, 04:00 AM
Post
#5
|
|
|
Teh Coder Group: Members Posts: 1,053 Joined: 18-April 06 From: Australia Member No.: 12,833 myCENTs:89.25 |
I use the standard session method, it's server side sessions as far as I know and not client.
|
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 4th December 2008 - 11:23 PM |