I found this on the Mazda6 forum and it works for the Mazda3:
Yes, this does work and I actually used it to program a 3rd remote for my Mazda3i (with power door locks). *8)
Have all the remotes that you are going to be using, maximum of 3, with you when you do this programming as all of them have to be reprogrammed into memory.
Step 1: Open driver side door and leave open.
Step 2: Lock and Unlock the drivers door using the power door lock switch on the door
Step 3: Insert key into the ignition.
Step 4: Turn Key to ON position and return to Lock (off) position. *Do this 3 times within 10 seconds. LEAVE key in the ignition in Lock (off) position.
Step 5: Close and open the drivers door 3 times. Leave door open after this step
Step 6: ECU should respond by locking and unlocking the doors once.
Step 7: Press any button on remote #1 twice. *ECU responds by locking and unlocking the car doors.
Step 8: Additional remotes, repeat Step 7 for up to 3 remotes total.
Step 9: Remove the key from the ignition and the ECU will respond a final time with a series (about 4) of door locks and unlocks. You're done!
Sticky this please...
NOTE: Sticky it is. Should it be here or in another section, like the one where you learn how to program a key? Dinu