I am starting out to learn database scripting using PHP/mySQL/Apache on Win98:
    Apache 1.3.14(Win32) with PHP 4.04pl1
   MySQL 3.23.28-gamma, localhost via TCP/IP

As an exercise I wrote a php script which dumps the contents of a 
form into a database, prints the contents of the table (most recent 
entry first) and repeats the form above those entries. It works but 
there are 2 odd side effects.

1. refusal to reset record number
        I filled out the form a number of times and the table became 
properly populated. Satisfied it was working (ha!), I deleted the 
trial data. When I started entering more data, new records no longer 
started with record number 1. Record number is defined as not null, 
auto increment & is the primary key. The record numbers don't reset 
themselves although the table has been emptied. So the first record I 
entered after emptying the table had record number 17, or something 
like that. I tried forcibly setting the record number to 1 using 
update, no luck.

2. duplicate records on page reload: only with Windows browser (IE and NN)
        If I fill out the form and submit, the page goes away and if 
I want to go back to the form and enter more data, I get a dialog box 
saying I must reload the form. This is intermittent - it was doing it 
yesterday, not today, and only using the Win98 browser (both IE and 
NN) - doesn't happen with my Mac browser. If I do that, the previous 
data is automatically re-entered, i.e., a duplicate new record goes 
into the table, although I have not re-entered that data in the form. 
The act of re-loading the form seems to duplicate the previous entry. 
I can make it happen today, by deliberately refreshing the page.

The first symptom seems a mySQL one. Not sure about #2, sorry if it's 
off-topic.

Not sure the script is the cause of all this, but will post if you 
think it's relevant.
Thank you all for your time.
Eve



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to