Re: Re: Everything works...Unless they hit the "back" button...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux