#39437 [NEW]: Im trying to use a function to write to a table but it won't work

From: Date: Wed, 08 Nov 2006 19:41:19 +0000
Subject: #39437 [NEW]: Im trying to use a function to write to a table but it won't work
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-33253@lists.php.net to get a copy of this message
From: craig at 321movers dot com Operating system: linix PHP version: Irrelevant PHP Bug Type: Website problem Bug description: Im trying to use a function to write to a table but it won't work Description: ------------ This function will not write to the file. It works find as regular code. I also could not create a working function containing a few if statements. Reproduce code: --------------- function tablewrite(){ fwrite($fh, '<td><div align=center>'); $text = $leadnum2; fwrite($fh, $text); fwrite($fh, '</div></td>'); fwrite($fh, '<td><div align=center>'); $text = $date; fwrite($fh, $text); fwrite($fh, '</div></td>'); fwrite($fh, '<td><div align=center>'); $text = $visitorip; fwrite($fh, $text); fwrite($fh, '</div></td>'); fwrite($fh, '<td><div align=center>'); $text = $referer; fwrite($fh, $text); fwrite($fh, '</div></td>'); fwrite($fh, '<td><div align=center>'); $text = $_POST['Name']; fwrite($fh, $text); fwrite($fh, '</div></td>'); fwrite($fh, '<td><div align=center>'); $text = $_POST['Move_Date']; fwrite($fh, $text); fwrite($fh, '</div></td>'); fwrite($fh, '<td><div align=center>'); $text = $_POST['City_From']; fwrite($fh, $text); fwrite($fh, '</div></td>'); fwrite($fh, '<td><div align=center>'); $text = $_POST['State_From']; fwrite($fh, $text); fwrite($fh, '</div></td>'); fwrite($fh, '<td><div align=center>'); $text = $_POST['Zip_From']; fwrite($fh, $text); fwrite($fh, '</div></td>'); fwrite($fh, '<td><div align=center>'); $text = $_POST['City_To']; fwrite($fh, $text); fwrite($fh, '</div></td>'); fwrite($fh, '<td><div align=center>'); $text = $_POST['State_To']; fwrite($fh, $text); fwrite($fh, '</div></td>'); fwrite($fh, '<td><div align=center>'); $text = $_POST['Phone']; fwrite($fh, $text); fwrite($fh, '</div></td>'); fwrite($fh, '<td><div align=center>'); $text = $_POST['Email']; fwrite($fh, $text); fwrite($fh, '</div></td>'); fwrite($fh, '<td><div align=center>'); $text = $_POST['Move_Size']; fwrite($fh, $text); fwrite($fh, '</div></td>'); fwrite($fh, '<td><div align=center>'); $text = $_POST['Additional_Comments']; fwrite($fh, $text); fwrite($fh, '</div></td></tr>'); fwrite($fh, $newline); fclose($fh); } Expected result: ---------------- write a new line to a table. Works fine as regular code. Actual result: -------------- does not write. -- Edit bug report at http://bugs.php.net/?id=39437&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39437&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39437&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39437&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=39437&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=39437&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=39437&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=39437&r=needscript Try newer version: http://bugs.php.net/fix.php?id=39437&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=39437&r=support Expected behavior: http://bugs.php.net/fix.php?id=39437&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=39437&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=39437&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=39437&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39437&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=39437&r=dst IIS Stability: http://bugs.php.net/fix.php?id=39437&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=39437&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=39437&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=39437&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=39437&r=mysqlcfg

« previous php.mirrors (#33253) next »