Ok I’m trying to make a small thing on a website that will allow the user to update the news themselves… after reading up on it i found that to export a textfile in this way I would have to have a serverside script to execute it for me (PHP in my case)… I did it, but it isnt working… what am i doing wrong? plz help
*Originally posted by Riddler? *
**hehe i know… i was just trying to help out and save some folks some time happy holidays! (the birth of Jesus is a world wide holiday ;)) **
[s] really?
I hadn’t noticed… [/s]
You were the one wondering, outloud, why your thread hadn’t been answered, so don’t get snippy to me…
wasn’t a smartass comment? you were the one who put the wink guy next to your obvious statement.
You are not well known here, so how am I supposed to know your intent? You sounded impatient, so I made an attempt to calm your eagerness. You then make a snippy remark with a wink, and now you say it caught you off guard?
BTW - if you want to use a flash footer, it needs to be 300 wide x 60 tall maximum. Just an FYI
Norie… I LOVE YOU :D!!! Thank you sooo much… and also big props for explaining that code too!!! thank you! i will try to remember to show you guys my finished product when im done :D!!!
hey thanx for the awesome help, but after I got to messing w/ it I hit another small problem that my lack on PHP knowledged kept me from fixing… here is my updated file i made to suit me:
<?php
$filename = 'news.txt';
$tag = 'news=';
$somecontent = $_POST['news'];
// Let's make sure the file exists and is writable first.
if (is_writable($filename)) {
if (!$handle = fopen($filename, 'w')) {
print "Cannot open file ($filename)";
exit;
}
// Write $somecontent to our opened file.
if (!fwrite($handle, $tag)) {
print "Cannot write to file ($filename)";
exit;
}
// print "news=$tag";
fclose($handle);
if (!$handle = fopen($filename, 'a')) {
print "Cannot open file ($filename)";
exit;
}
// Write $somecontent to our opened file.
if (!fwrite($handle, $somecontent)) {
print "Cannot write to file ($filename)";
exit;
print "news=$somecontent";
fclose($handle);
}
print "news=$somecontent";
} else {
print "news=The file $filename is not writable";
}
?>
my prob is that if i enter something into my text box that has an apostrophe of quotation PHP automatically adds the backslash for the obvious reasons… but this messes me up when I try to use my HTML tags or just apostrophe’s in my lil example thing at www.jayhayes.no-ip.com/Jay/crap/thingy.html thanx again guys