0

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.";
}
else{
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"/>
</form>
<?php
}
<?php 
 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"; 
 fclose($Handle); 
 ?>

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

2
Contributors
1
Reply
2
Views
7 Years
Discussion Span
Last Post by chintan@dani
0

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?

Edited by Ezzaral: Snipped &quot;fake sig&quot; link. Please restrict such links to your site-wide user signature, which can be edited from the user control panel.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.