It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming PHP and MySQL Forum

Need major help with this...

Moderator: Malcolm

Need major help with this...

Postby YinYang on Mon Dec 11, 2006 11:22 pm

Hello, I would like to know why this code is not working...
what I want it to do is code html to a page and replace certain parts with info someone puts in, and then redirects them after the code is done... (should be simple for most of you).


Code: Select all

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

$stringData1 = ("<br /><div class=\"conthead style2\">");
$enddiv = ("</span></Div><br>\n");
$stringData2 = ("<div class=\"fixcont\"><span class=\"style2\"\><b>Rank:</b> Member<br><b>Character Names:</b> ");
$stringData3 = ("<br><b>Email:</b> ");
$stringData4 = ("<br><b>AIM/YAHOO/MSN:</b> ");
$stringData5 = ("<br><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);


YinYang
 
Posts: 15
Joined: Sun Jun 11, 2006 1:43 am

Postby rse on Thu Jan 25, 2007 4:14 pm

Do the extra brackets make any difference?

From:
$stringData1 = ("<br /><div class=\"conthead style2\">");

To:
$stringData1 = "<br /><div class=\"conthead style2\">";
Adam Williams
PHP Web Developer

Personal: http://30things.net
Blog: http://www.root-servers.co.uk
User avatar
rse
100+ Club
 
Posts: 141
Joined: Sun Oct 10, 2004 8:15 pm
Location: Leeds, UK


Who is online

Users browsing this forum: No registered users and 0 guests