Can you please tell me what is wrong with this php code of mine it doesn’t work -sintax?
Jun 6th, 2010
session_start();
$webpageName = $_POST[webpageName];
$userId = $_POST[userId];
$userName = $_POST[userName];
$fileName = $_POST[fileName];
$imageAddress = $_POST[imageAddress];
$meContent = $_POST[meContent];
$familyContent = $_POST[familyContent];
$faithContent = $_POST[faithContent];
$jobContent = $_POST[jobContent];
$hobbiesContent = $_POST[hobbiesContent];
$emailAddress = $_POST[emailAddress];
$indexCode = file_get_contents("index.html");
$underscore = "_";
$dash = "-";
$ext = ".html";
$ext2 = ".php";
$url = "http://www.itseminary.com/php%20experiment/student_webpage/";
$myFile = "$fileName$ext";
$fh = fopen($myFile, 'a') or die("can't open file");
fwrite($fh, $indexCode);
$myUrl = "$url$myFile";
$listerContent = "“>“;
$lister = “userId$ext2″;
$fh = fopen($lister, ‘a’) or die(“can’t open file”);
fwrite($fh, $listerContent);
include ‘$lister’;
?>
My question is: is there a sintax error that I don’t see?
I am not asking you to do my job, i have expended 12 hours reviewing this code and I can’t see any errors no more.
I am trying to make a program that take data from a form and make a personal webpage which the link for it is listed in another page, also created by the code (lister)
Answers don’t show long lines codes (the ones finishing with … ) so, to see the entire code go here:
http://itseminary.com/php%20experiment/student_webpage/code.txt
Thank you David,
After your contribution, I could finaly make the link. The only thing there was that you don’t need to scape of characteres if you are not dealing with the string itself.
But thanks a lot!

Twitter
3 Comments