Hi. I Need help simplifying repeating entries in my script. I have lots of repeating entries which are a pain to configure for the user. I rather have this script do this task automatically. I tried to use loops to solve this but I ended up settling with this method.
[php]<?php header('Access-Control-Allow-Origin: http://mysite.com'); ?>
<?php if(sizeof($_POST)) { file_put_contents; } else { echo "ERROR! Must be activated from script!"; exit(); } file_put_contents( "content.html", $mystring . " Updated last: " . $_POST['date'] . "" . //Please add more entries depending on how many accounts you have configured "Account 1
(" . $_POST['accountname1'] . ")" . "
CREDITS
" . $_POST['credits1'] . "
-
" . "Account 2
(" . $_POST['accountname2'] . ")" . "
CREDITS
" . $_POST['credits2'] . "
-
" . "Account 3
(" . $_POST['accountname3'] . ")" . "
CREDITS
" . $_POST['credits3'] . "
-
" . "Account 4
(" . $_POST['accountname4'] . ")" . "
CREDITS
" . $_POST['credits4'] . "
-
" . "Account 5
(" . $_POST['accountname5'] . ")" . "
CREDITS
" . $_POST['credits5'] . "
-
" . "Account 6
(" . $_POST['accountname6'] . ")" . "
CREDITS
" . $_POST['credits6']); ?>[/php]