Re: need help

From: Date: Wed, 18 Apr 2001 06:50:46 +0000
Subject: Re: need help
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-49136@lists.php.net to get a copy of this message
On Wed, 18 Apr 2001 16:08, chris herring wrote: > this is really buggin me... i've got this free-for-all that i want to > make, and everything seems logical, but.... > > echo "<form method=\"POST\" action=\"$PHP_SELF\" > name=\"linkadd\">"; > echo "<input type=\"text\" name=\"url\" size=\"20\" > value=\"http://\"><br>"; echo > "<input type=\"text\" name=\"text\" > size=\"20\"><br>"; > echo "<input type=\"submit\" name=\"submit\" value=\"Generate > New > Link\">"; echo "</form>"; > > > > if (isset($url) && isset($text)) { > $fp = fopen("./file.txt", "w"); > fwrite("$fp", "<a > href=\"$url\">$text</a><br>", "w"); > fclose($fp); > } > > ... that isn't writing anything to the file. any help would be > appreciated. thx in advance The third arg to fwrite (optional) is an integer value for the length of the string to be written. -- David Robley | WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA

« previous php.general (#49136) next »