PDA

View Full Version : [NEEDED] Basic PHP script edit



MrPinkPanther
28-03-2009, 10:04 PM
I would rather not pay because I know its a real simple job, I just dont know PHP well enough but I will of course pay if need be. Heres the script:

<?php
$myText = $_POST ['MyText'];
$myFile = "test.txt";
$fh = fopen($myFile, 'w') or die("can’t open file");
fwrite($fh, "My text is: ");
fwrite($fh, $myText);
fclose($fh);
?>

I need an edit so a folder is created with the text of the imported variable MyName (if the folder does not already exist). Inside that a text file will be created, named as the text of the imported variable of MyFile.
myText is then written in this text file.

So for example my application says that:
MyName = George
MyFile = GeorgesFile
myText = Helloooo, this is Georges file

So a folder is created called George and inside it is a text file called GeorgesFile and written in that is Helloooo, this is Georges file

Moved by ReviewDude (Forum Moderator) from 'Web Market'.

MrPinkPanther
29-03-2009, 01:37 PM
I forgot to mention, I would like (if possible) for the strings in MyFile and MyName to be automatically converted to lower case. Come on people, Im willing to pay for a real simple job!

Cushioned
29-03-2009, 08:26 PM
Heya...

I've got the file written up if you still need.

Dentafrice
29-03-2009, 08:38 PM
Where is MyName coming from?

MrPinkPanther
29-03-2009, 08:44 PM
Where is MyName coming from?
External application :)

Joshh is doing this now so no worries people :)

Dentafrice
29-03-2009, 08:45 PM
Well I'd have it done in about 10 seconds for free, but okay.

MrPinkPanther
29-03-2009, 08:48 PM
Well I'd have it done in about 10 seconds for free, but okay.
As much as I'd love that I've asked him to do it and said I'll pay him now and I hate going back on my work. +Rep anyway, thanks mate.

Want to hide these adverts? Register an account for free!