MrPinkPanther
25-04-2009, 09:45 AM
Ok, I have this code which writes to a text file. But when it does it writes it with a space infront. So "I am god" is written into the file as " I am god". I basically need the first space to be removed.
Heres the code:
<?php
$name = $_GET["name"];
$myFile = "data.txt";
$ab = fopen($myFile, 'w');
fwrite($ab, $name);
fclose($ab);
Header("Location: http://www.google.co.uk/");
?>
Heres the code:
<?php
$name = $_GET["name"];
$myFile = "data.txt";
$ab = fopen($myFile, 'w');
fwrite($ab, $name);
fclose($ab);
Header("Location: http://www.google.co.uk/");
?>