Cgi programing need help for backup database ?

Hi ,
i'm in way of doing a small cgi to backup/restore database,
i'm not a programmer so... ill be able to pass the paramater from an html to the cgi but dont know how to place this parameter inside the cgi to do what i want... :

If i want to pass parameter (dbname, dbusername, pass how i can do that ?

# -Cgi that work for get backup of mysql--------------------------
#!/bin/bash

FILE=mysqlbackup.sql
NAME=mydbusername
PASS=mypasss
DB=mydb

echo "Content-type: text/plain"
echo
echo "Tried to export file: "$FILE

/usr/local/psa/mysql/bin/mysqldump --quote-names -u $NAME --password=$PASS $DB > $FILE
# END--------------------------------------------------

I want to pass parameter from html form like mypass, mydb etc.. to the cmd that get the backup (way to put the form parameter to $pass $db etc....

How i can do that ?

Thanks !

 

 

 

 

Top