alexnz
26th June 2006, 05:52
just too start this off im a completely newbie when it comes too php scipting so im asking for a little help with a couple of things, once i have a working example of something ill then be able too learn from it then expand it too other things i would like done:
firstly - the look of it:
have a list of 10 fields from which i can enter text information too
a list of 10 radio buttons from where i can only choose one radio button
a "go" button at the bottom that then runs the script, and a "clear" button that resets the form
backend:
basicly i want too be able too run shell scripts from PHP once the information has been entered for example (i dont know the correct syntax if someone can correct me)
once the information is entered, lets just use field1 and field2, and the user has choosen radio button1 it will run script1.sh with field1 information,
field1 would usually be a username ie: web1_user1
field2 would usually be a specified directory ie: custom1 or template1
radio button 1 example:
inside script1.sh i would like it too be copying files from one static directory ie /var/www/texmplate1 too a dynamic directory specified by field2ie: /var/www/$field2/web
radio button 2 example
if they choose button2 i would like a file too be created lets make it a .htaccess file, i would then like the following field1 and field2 entered into it when the .htaccess file is created example:
AuthType Basic
AuthName "Members Only"
AuthUserFile /var/www/$field1/.htpasswd
<limit GET PUT POST>
require valid-user
</limit>
then once the file is created itll put it into a directory labelled by $field2 ie: copy .htaccess /var/www/$field1/web/$field2
if someone could type up my examples i can then learn from it and build up my scripting from there thanks!
thanks too anyone that can help!
firstly - the look of it:
have a list of 10 fields from which i can enter text information too
a list of 10 radio buttons from where i can only choose one radio button
a "go" button at the bottom that then runs the script, and a "clear" button that resets the form
backend:
basicly i want too be able too run shell scripts from PHP once the information has been entered for example (i dont know the correct syntax if someone can correct me)
once the information is entered, lets just use field1 and field2, and the user has choosen radio button1 it will run script1.sh with field1 information,
field1 would usually be a username ie: web1_user1
field2 would usually be a specified directory ie: custom1 or template1
radio button 1 example:
inside script1.sh i would like it too be copying files from one static directory ie /var/www/texmplate1 too a dynamic directory specified by field2ie: /var/www/$field2/web
radio button 2 example
if they choose button2 i would like a file too be created lets make it a .htaccess file, i would then like the following field1 and field2 entered into it when the .htaccess file is created example:
AuthType Basic
AuthName "Members Only"
AuthUserFile /var/www/$field1/.htpasswd
<limit GET PUT POST>
require valid-user
</limit>
then once the file is created itll put it into a directory labelled by $field2 ie: copy .htaccess /var/www/$field1/web/$field2
if someone could type up my examples i can then learn from it and build up my scripting from there thanks!
thanks too anyone that can help!