PHP Setup 

1. Create folder dynamic_php   at same level as public_html  (not inside public_html) 

2. From command prompt in terminal: 

        ssh -l  loginname ruacad.radford.edu  

     Use Unix navigation, permission and file management commands 

            Permissions for dynamic_php folders and files are:    chmod 711 *.* 

            or chmod 711 directoryname

 

PHP #1 -- Make a basic file

1.  Open getting_started  / phpinfo.php and  welcome.php and upload to your dynamic_php folder. 

2. Change permissions.

3. Test. https://php.radford.edu/~Yourname/phpinfo.php  and https://php.radford.edu/~Yourname/welcome.php   

It should look like this and like this 

 

PHP #2 -- Make a Form

First, put the processform.php in your dynamic_php file.

Next, create another page for the form.  This file will have a .php suffix and be located in your dynamic_php folder

It will have the usual html commands but  the variables statement goes into the header in php form as follows.

 

<?

//Enter here the Email address to which you want to direct all the mails

$recepient = "yourname@radford.edu";

//Enter subject of the email to you e.g. feedback from site etc.

$subject = "Whatever Your Subject Is ";

//Enter header with any additional information you may want to be sent with the form

$mailheader = "Whatever Your Mailheader Is ";

//Insert the directory for the Form processor relative to directory where this form is located.
//For this example the processor is in the same directory as the Form. 
// This can be left blank in the RU system

$processdir = "";

//Message to be displayed if the Form is sent successfully.

$sent = "Thanks for filling out our survey! Your response has been sent . ";

//Message to be displayed if the attempt to send the form fails.


$failed = "Sorry! Your message could not be sent. Please try again. If the problem persists please contact us by Email (Yourname@radford.edu).";

//#################DO NOT CHANGE FROM HERE###############

$formprocessor = $processdir . "processform.php3";

// Sets up hidden fields for form and opens the form tag

echo "<form action = \"$formprocessor\" method = \"post\" ONSUBMIT=\"return validateForm()\">\n";
echo "<input type = \"hidden\" name = \"recepient\" value = \"$recepient\">\n";
echo "<input type = \"hidden\" name = \"subject\" value = \"$subject\">\n";
echo "<input type = \"hidden\" name = \"sent\" value = \"$sent\">\n";
echo "<input type = \"hidden\" name = \"failed\" value = \"$failed\">\n";
echo "<input type = \"hidden\" name = \"mailheader\" value = \"$mailheader\">\n";
echo "<input type = \"hidden\" name = \"processdir\" value = \"$processdir\">\n";

// #################JUST KEEP ALL THIS ABOVE ###############

?>

From here you deal with <body> items, including a  radio box, checkbox or other form fields. This is in standard HTML code
Then at the end there is  this standard HTML itme 

<input type="SUBMIT" value="Send Form"> 

4. Save in dynamic_php, change permissions and test using the following web address: 

https://php.radford.edu/~Yourname