OK, OK I am new at this... its 3 different pages, I didnt really want to post links cause it does add pages to the server. What I am trying to do is make a script that will generate a page with the info that the user puts in the form. This is the form:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Common Name</TITLE>
<META http-equiv=Content-Language content=en-us>
<META content="Microsoft FrontPage 5.0" name=GENERATOR>
<META content=FrontPage.Editor.Document name=ProgId>
<META http-equiv=Content-Type content="text/html; charset=windows-1252"></HEAD>
<BODY><B><FONT size=5>World Cichlid Profiles Generator</FONT></B>
<FORM action=gen.php method=post>Common Name:
<INPUT
name=common size="20"><BR>Scientific Name: <INPUT name=sci size="20"><BR>Habitat:
<INPUT
name=location size="20"><BR>Size: <INPUT name=size size="20"><BR>Diet: <INPUT size=50
name=diet><BR>Tank Size: <INPUT name=tank size="20"><BR>Temperament:
<INPUT
name=temper size="20"><BR>Breeding Info: <INPUT size=50 name=breed><BR>Temperature:
<INPUT
name=temp size="20"><BR>PH: <INPUT name=ph size="20"><BR>URL of Picture: <INPUT size=50
name=pic><BR>Author of Profile: <INPUT name=author size="20"><br>Filename: <INPUT size=50 name=filename><BR><INPUT type=submit value=Submit> </FORM>
<P> </P></FORM>
<P> </P>
<P> </P></BODY></HTML>
This is the PHP program that the form is sent to:
<html>
<head>
</head>
<body>
<?php $common = $POST['common']; ?>
<?php $sci = $POST['sci']; ?>
<?php $location = $POST['location']; ?>
<?php $size = $POST['size']; ?>
<?php $ph = $POST['ph'];?>
<?php $temp = $POST['temp']; ?>
<?php $diet = $POST['diet']; ?>
<?php $tank = $POST['tank']; ?>
<?php $temper = $POST['temper']; ?>
<?php $breed = $POST['breed']; ?>
<?php $author = $POST['author']; ?>
<?php $pic = $POST['pic']; ?>
<?php $fp = fopen($_POST['filename'], "w"); ?>
<?php $string = '<html>
<head>
</head>
<body>
<font size=6>
<img src="<?php $pic; >">
<b> <font size=3>
<b> <?php echo $common; ?> <br>
</b><strong>Scientific Name:</strong><i><?php echo $sci; ?> </i><br>
<b>Location:</b> <?php echo $location; ?> <br>
<b>Size:</b> <?php echo $size; ?> <br>
<b>PH:</b> <?php echo $ph; ?> <br>
<b>Temerature:</b> <?php echo $temp; ?> <br>
<b>Diet:</b> <?php echo $diet; ?> <br>
<b>Tank minimum:</b> <?php echo $tank; ?> <br>
<b>Temperament:</b> <?php echo $temper; ?> <br>
<b>Breeding:</b> <?php echo $breed; ?>
<br><b>Profile written by:</b> <?php echo $author; ?> <br>
<br>
For more info visit <a href="http://www.worldcichlids.com/yabbse/index.php">Worldcichlids
Help Forums.</a>
</body>
</html>
'?>
<?php fwrite($fp, $string); ?>
<?php fclose($fp); ?>
</body>
</html>
I want it to put the code from $string into the new document. I hope that makes sense.