473,387 Members | 1,876 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Writing to Html file problem?

I had problem of writing the php data to the html, everytime i submit
the info, the data is added to the database, but not to the html file

$ourFileName = "testFile.html";
$ourFileHandle = fopen($ourFileName, 'w') or die("can't open file");

$last = trim($_POST['last']);
$comment = trim($_POST['comment']);

fwrite($ourFileHandle, "$last"\n$comment");

fclose($ourFileHandle);

Jul 17 '05 #1
1 1212
Am Mo 09.05.05 um 15:07 CEST schrieb ma*****@hotmail.com:
I had problem of writing the php data to the html, everytime i submit
the info, the data is added to the database, but not to the html file

fwrite($ourFileHandle, "$last"\n$comment");


Hint: do a error_reporting(E_ALL); in you scripts. Than you propably had
seen the problem of the wrong quotes:
fwrite($ourFileHandle, "$last"\n$comment");
should be
fwrite($ourFileHandle, "$last\n$comment");

stefan
Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Randy Jackson | last post by:
Hello all. Okay, this seems really stupid, but it's driving me up the wall. I have a simple script I've written to log some information to a text file. Everything seems to be okay, the code...
48
by: Joseph | last post by:
Hi I'm writing a commercial program which must be reliable. It has to do some basic reading and writing to and from files on the hard disk, and also to a floppy. I have foreseen a potential...
3
by: VMI | last post by:
I'm having trouble writing several records from an XML file into an html file. The problem is that it only outputs one record to the html file. I need to export all the records in the xml file to...
2
by: Jacob Kroon | last post by:
I'm writing a block-diagram editor, and could use some tips about writing/reading diagrams to/from an xml file format. The basic layout of my code : class Diagram { Blocks blocks } class...
8
by: FM | last post by:
Hello: I want to create a trigger wich performs a write-action to a text file. I'm intending to create it with: CREATE TRIGGER TR_ALARMA_TSPRE AFTER INSERT ON T_ALARMA_TS FOR EACH STATEMENT...
6
by: arne.muller | last post by:
Hello, I've come across some problems reading strucutres from binary files. Basically I've some strutures typedef struct { int i; double x; int n; double *mz;
3
by: bpejman | last post by:
I have a Perl-driven website on a windows 2003 server. I have configured the IIS and have set the permissions on the Home Directory tab to Read, Write and my Execute Permissions are set to "Scripts...
4
by: Jeff | last post by:
I've been working on porting some perl CMS code to PHP. What I would do in perl is search through a template for instruction and replace those instructions with specific bits for that particular...
3
by: karthikchittur | last post by:
Hello scripters Requirement: I am trying to write a perl script that manipulate a html file. Both the html file and the script are placed at central server. I have scheduled one more script in...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.