i am trying to open a file processOrder.php which write sale info to a table called sale.
i am creating a file called transfer.php. this file will run when an administrative user presses a button and its purpose is to start writing sale information into a new table, sale2 instead of sale.
Basically all i want to do is to get transfer.php to open ProcessOrder.php and replace any occurences of the word "sale" with "sale2".
I tried this but it gives me the error shown below...
$out=fopen("ProcessOrder.php","r+") or die ("file won't open");
preg_replace("sale", "sale2", $out);
Warning: Delimiter must not be alphanumeric or backslash in /home/deg4/d99kg/public_html/transfer.php on line 18
Can anyone help me out?