Well, I have no idea whats going on... But here is the problem:

I have these files:

$file2 = "password_protect.php";
$newfile = $newDir . "/password_protect.php";
if (!copy($file2, $newfile)) {
    echo "Creation failed.";
chmod($newfile, 0777);
chmod("passProcess.php", 0777);
echo "Step 1/2 completed.<br />"
<form action="passProcess.php?var=Users/<?PHP echo $projectname  ?>/" method="post">
New password: <input type="text" name="addition"/><br/>
<input type="submit"/>
 echo $_GET['var'] . "<br />"; 
 echo $_POST['addition']; 
 $File = "creativecodingstudios.com/connect/" . $_GET['var'];
 $Handle = fopen($File, 'a'); 
 $Data = "$password = " . $_POST['addition']; 
 fwrite($Handle, $Data); 
 print "Data Added"; 

But on the second code, I get a 500 error. Why?

Hello CreativeCoding

I have read your post but i can not understand what are you truing to do?
Do you want to write password in file ($File)?

Is the $newDir path is correct?
Have you specify what $newDir contain?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.