Hi, I’m new here! I thought of this code myself, even though I’m just learning php. I guess I’ll tell you whatim trying to do. I have a person type some info on the websites index.php page, then when they press enter, it brings them to input_info.php (this page). It gathers there data, and creates a WebPage out of it. What I want it to do is that when is saves the file in the root directory, I want to move it to the pages directory. But when it try’s to move the file, it brings up this error:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/a7430326/public_html/input_info.php on line 13Here is my code:
[php]
yay, it worked…
<?php $sig = $_GET["yoursig"]; $contents = $_GET["content"]; $yourName = $_GET["yourname"]; $ourFileName = $_GET["fname"]; $ourFileHandle = fopen($ourFileName, 'w') or die("can't open file"); echo fwrite($ourFileHandle, "The person who made this is called $yourName, and this person created *$ourFileName*!
"); echo fwrite($ourFileHandle, "$contents"); echo fwrite($ourFileHandle, "$sig"); fclose($ourFileHandle); copy("/"+$ourFileName, "/pages/"+$ourFileName); ?>[/php]
Can you help me?