2 hours ago, I absolutely have no idea how to program in PHP. I took a PHP crash course, because I need to back up my website database. The hosting provider doesnt provide any front end application, so I create a PHP script:

You've said nothing about your webhost, so there is nothing that anyone here can assume about the execution environment.

system() returns the last line of output on success, false on error. Also because of being a (server side) web scripting language, it has security that can be set up --- safe mode ! When safe mode is enabled, the command is escaped, killing shell specials (e.g. > becomes \>). Safe mode can also be used to restrict the commands that can be executed by PHP scripts.

If zip is failing, it's quite possible that either:

A.) zip/mysqldump is not installed,
B.) zip/mysqldump is not in your search path (or safe_mode_exec_dir),
C.) You do not have permission to execute the program(s),
D.) the arguments are wrong (e..g you can execute zip, but mysqldump args \> file failed)

I don't know MySQL enough to know what access controls may be placed on a user trying to mysqldump their own data, but if it's possible to restrict that, it could be set that way on your host.

When it comes to learning PHP, if you go to the documentation and read the 'Language Reference' section, you've learned most anything you need to know.