Reply to Re: [PHP] Re: Everything works...Unless they hit the "back" button...

Your name:

Reply:


Posted by "Kristen G. Thorson" on 08/03/05 17:33

The code below isn't much help to debug. Do some checking to figure out
how far into your IF statement you're getting. Is the query running?
Is it the query you expect? (Step #1 when inserting or creating dynamic
queries that aren't working: print them out to make sure they are what
you think they are.) Is the category being incremented? You say you
can go back, but you can't go forward. Look at the page source, is the
form action what it should be? Look at the form hidden variables (if
any) are they what you expect?


kgt



Jack Jackson wrote:

> Hi, mark,
>
> <snip>
> Mark Rees wrote:
> > Do you want to allow people to go back and change things ?
> > If so, write a suitable UPDATE statement
> </snip>
>
> Thanks, but I think the update function should be built in -- the sql
> checks whether the userAnswer table contains the q_id the user has
> just entered; if so, it deletes the row containing it and then the
> second query inserts the new values.
>
> $qidlist_sql="DELETE FROM teresa WHERE q_id IN (" .
> (implode(",",$qidlist)) . ");"
>
> $q_a_sql="INSERT INTO teresa (u_id, q_id, a_id )
> VALUES " . (implode(",",$qanda)) . ";";
>
>
> I think there's something wrong with the logic of how I'm handling
> $_POST info and passing it back and forth: here's why: if I close the
> browser and reopen it and refill the same questions, the answer table
> shows the updated answers. there's something in the logic I am using
> about how I am advancing the $cat and managing the $_POST information.
> I think . But I cannot find it.
>
> Anyone?
>
>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация