My php Code Wont Work

just made this but it wont write to the .html nothing is coming up even the date and time varible. Could u help. Thanks

Ps. ignore that email part at bottom , thanks :slight_smile:

<?php $datetime = date("d-m-y / H:i:s"); $name =$_POST ['name']; $ip = $_POST ['REMOTE_ADDR']; $sellersemail = $_POST ['sellersemail']; $sellersname = $_POST ['sellersname']; $soldinfo = $_POST ['soldinfo']; $profet = $_POST ['profet']; $fopen = fopen("log.html", "a" ); (fwrite($fopen, $invoegen)); (fclose($fopen)); // storing cookey for there name for security and so they have easy longin.------------ $_SESSION["name"] = $name ; $_SESSION["profet"] = $profet ; //--------------------------------------------not in use atm--------------------------- $invoegen = $head1 . $datetime1 . $name1 . $ip1 . $sellersemail1 . $sellersname1 . $soldinfo1 . $profet1 . $finish1 . "
"; $head1 = "" ; $datetime1 = "" ; $name1 = ""; $ip1 = ""; $sellersemail1 = ""; $sellersname1 = ""; $soldinfo1 = ""; $profet1 = ""; $finish1 = ""; $to3 = "[email protected]"; $subjec3t = "Could not connect: . mysql_error(1)"; $body3 = "Having Some Problems Here With The Script It Wont Freaking Connect To Mysql :/ HELLLP!"; /* Updating The Accounts Sales And Prices */ //command for inputing data. ?>
" . $datetime . "" . $name . "" . $ip . "" . $Selleremail . "" . $sellername . "" . $soldinfo . "" . $Profet . "

you should change:
[php](fwrite($fopen, $invoegen));
(fclose($fopen));
[/php]

to

[php]
fwrite($fopen, $invoegen);
fclose($fopen);
[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service