Re: need help

From: Date: Wed, 18 Apr 2001 06:51:27 +0000
Subject: Re: need help
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-49135@lists.php.net to get a copy of this message
On Wednesday 18 April 2001 08:38, 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.... I did a quick rewrite here. it adds links as people enters them :) <? echo <<<END <form method="POST" action="$PHP_SELF" name="linkadd"> <table border="0" cellspacing="2" cellpadding="0"> <tr> <td>Url: </td> <td><input type="text" name="url" size="20" value="http://"></td> </tr><tr> <td>Name: </td> <td><input type="text" name="text" size="20"></td> </tr><tr> <td colspan="2"><input type="submit" name="submit" value="Generate New Link"></td> </tr> </table> </form> END; if (isset($url) && isset($text)) { if ($fp = fopen("./file.txt", "a")) { fwrite($fp, "<a href=\"$url\">$text</a><br>\n", "w"); fclose($fp); } } ?> > 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 -- php developer / CoreTrek AS | Real Programs don't use shared text. Sandnes / Rogaland / Norway | Otherwise, how can they use functions web: http://www.moijk.net/ | for scratch space after they are

« previous php.general (#49135) next »