p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

beginning_php thread: trouble updating


Message #1 by "seanin" <seanin@t...> on Sun, 27 Oct 2002 00:53:52 +0100
BlankI seem to be having a strange problem. I am building a classified ad site where I let the users
modify their ads.Once authenticated, they are presented their ad with a modify link at the bottom.
When this is clicked they get a form with the relevant values in the boxes ready for modification.

 The problem is, if its the first time this ad is being modified, the server can't find the next page when the form is submitted for
updating the DB ...(ERR 404). 
Hit the back button and re_submit the form and the next page jumps up no problem (the thank you bit and the modified ad) .
This doesn't happen on my local machine.

Has anybody any clues out there about what's happening??


T.I.A
Sean




Message #2 by "Nikolai Devereaux" <yomama@u...> on Mon, 28 Oct 2002 12:15:27 -0800
It's difficult to say... you'll need to compare the two installations to see
what's different.  Are you using sessions?  Are there differences in
error_reporting?

Does the database on your home machine contain different data than the hosting
server?  Are you using a wide enough variety of test submissions for your
project?

stuff like that.  If something works on one machine, and doesn't on another,
more often than not it means that there are some logic flaws in the code that,
for some reason, don't affect things in one configuration.


The first place I'd look is where you calculate the next page to go to after
the update is complete.

Message #3 by "seanin" <seanin@t...> on Mon, 28 Oct 2002 20:39:49 -0000
Thanks Nik for your reply. I'll dig into the code, see whats goin on. The
thing that baffles me most is that every thing is fine when you  hit the
back button and resubmit the form for updating.
Thanks again.

Sean
----- Original Message -----
From: "Nikolai Devereaux" <yomama@u...>
To: "beginning php" <beginning_php@p...>
Sent: Monday, October 28, 2002 8:15 PM
Subject: [beginning_php] RE: trouble updating


>
> It's difficult to say... you'll need to compare the two installations to
see
> what's different.  Are you using sessions?  Are there differences in
> error_reporting?
>
> Does the database on your home machine contain different data than the
hosting
> server?  Are you using a wide enough variety of test submissions for your
> project?
>
> stuff like that.  If something works on one machine, and doesn't on
another,
> more often than not it means that there are some logic flaws in the code
that,
> for some reason, don't affect things in one configuration.
>
>
> The first place I'd look is where you calculate the next page to go to
after
> the update is complete.
>
>
>

Message #4 by "Nikolai Devereaux" <yomama@u...> on Mon, 28 Oct 2002 13:15:01 -0800
> Thanks Nik for your reply. I'll dig into the code, see whats goin on. The
> thing that baffles me most is that every thing is fine when you  hit the
> back button and resubmit the form for updating.


That's why I suggested looking at how the location of the next page is
generated first.  Hopefully the answer will be located near there!


  Return to Index