Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Computer Forums > Programmers Lounge > Programming Discussions » Writing HTML with php problem.
Closed Thread
Old 12-11-2006, 06:34 PM   #1 (permalink)
 
True Techie

Join Date: Jan 2006

Posts: 242

Yin-Yang

Default Writing HTML with php problem.

I'm trying to write HTML with php, the only problem is... well its not working. here is the codes.


PHP Code:
<?php

$myFile 
"memberlist.html";
$fh fopen($myFile'a') or die("ERROR!");

$stringData1 = ("
<div class=\"conthead style2\">"
);
$enddiv = ("</span></Div>
\n"
);
$stringData2 = ("<div class=\"fixcont\"><span class=\"style2\"\>[b]Rank:[/b] Member
[b]Character Names:[/b] "
);
$stringData3 = ("
[b]Email:[/b] "
);
$stringData4 = ("
[b]AIM/YAHOO/MSN:[/b] "
);
$stringData5 = ("
[b]Self-Comment:[/b] "
);

fwrite($fh$stringData1);
fwrite($fh$_POST['name']);
fwrite($fh$stringData2);
fwrite($fh$_POST['Characters']);
fwrite($fh$stringData3);
fwrite($fh$_POST['email']);
fwrite($fh$stringData4);
fwrite($fh$_POST['IM']);
fwrite($fh$stringData5);
fwrite($fh$_POST['comment']);
fwrite($fh$enddiv);

fclose($fh);

?>

__________________
<a href= http://r.yuwie.com/yinyangerror>http://i65.photobucket.com/albums/h2...uwieBanner.png</a>
Yin-Yang is offline  
Old 12-11-2006, 11:33 PM   #2 (permalink)
office politics's Avatar
 
It's all just 1s and 0s

Join Date: Jan 2004

Location: in the lab

Posts: 4,410

office politics will become famous soon enough

Default

it looks like the script creates a html page but does not display it.

you would have to use the echo command instead of fwrite for the browser to display the generated page.

otherwise open memberlist.html to view your output.
office politics is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On