Saving echoed form page

commguy

New Member
Messages
6
Reaction score
0
Points
0
Hi everyone. I'm a noob at scripting and have hit a wall. I'm trying to create a form that sends user input to a formatted html file that users can save and use (it's an e-mail signature template).

The form and resulting page look fine, but I'm having trouble with the saving part... I don't know how to save it directly and if I prompt users to "save as" HTML they will not have the graphics. If they save as a web page complete, the user data is missing.

Any suggestions to get me on the right track are greatly appreciated. And a bottle of Scotch for anyone with a solution! :)

Here's a link to where I am now:
http://trainacomm.exofire.net/signature.htm

Here's a link to another site that does what I'm attempting to do:
http://www.vsubhash.com/projects/email_signature_gen.asp

MY UGLY PHP FILE:
<html>
<body>
<font size="2" face="Arial">
________________________________________
<br>
<span style="text-transform: uppercase">
<br><?php echo $_POST["fname"]; ?></span></b><span style="text-transform: uppercase">
</span>
<br><?php echo $_POST["title"]; ?>
<br>
<br></font></b><font size="2" face="Arial">1111 Seveda Blvd. | Torrance, CA 90505<br>
</b>+1-<?php echo $_POST["phone"]; ?> | +1-<?php echo $_POST["fax"]; ?> | +1-<?php echo $_POST["mobile"]; ?><br>
<span style='color:#DE2020'>companyname.com
<br>
<br>
</span></font><font face="Arial">
<img border="0" src="conill2.gif" width="90" height="53"><br>
<font color="#666666"><br>
</font><font size="1"><font color="#333333">
<img border="0" src="twit.gif" width="15" height="15">&nbsp;
</font><a href=http://twitter.com style="text-decoration: none">
<font color="#333333">Follow us on Twitter</font></a><font color="#333333"><br>
<img border="0" src="face.gif" width="15" height="15">&nbsp;
</font>
<a href="http://www.facebook.com/" style="text-decoration: none">
<font color="#333333">Join the Nuevo America on Facebook</font></a></font></font>

</body>
</html>

THE FORM PAGE:
<html>
<body>
<form action="welcome.php" method="post" target="_test.htm">
<font face="Arial">
&nbsp;
</font>
<b><font face="Arial">E-Mail Signature Maker<br>
</font></b><font face="Arial" size="2"><b><br>
</b></font>
<font size="2"><font face="Arial"><br>
</font>
<br>
</font><font face="Verdana"><font size="2">Name:&nbsp; </font>
<input type="text" name="fname" size="39" /><font size="2"> <br>
<br>
Title:&nbsp;&nbsp; </font> <input type="text" name="title" size="39" /><font size="2">
<br>
<br>
Phone: </font> <input type="text" name="phone" size="39" /><font size="2"> <br>
<br>
Fax:&nbsp;&nbsp;&nbsp; </font> <input type="text" name="fax" size="39" /><font size="2">
<br>
<br>
Mobile:</font><input type="text" name="mobile" size="39" /><font size="2"> (this is optional)
<br>
<br>
</font></font><font size="2"><br>
</font>
<input type="submit" value="SUBMIT" /><font size="2"> </font>
</form>
</body>
</html>
 

garrettroyce

Community Support
Community Support
Messages
5,609
Reaction score
250
Points
63
What's the purpose of saving the form? Are the users going to need to look at the form on their own computer or are they supposed to put it on their own website?

In either case, you could use PHP to create a .zip with the html and images and the user can download that.

http://us2.php.net/manual/en/book.zip.php
 

commguy

New Member
Messages
6
Reaction score
0
Points
0
The users need to save the files to their machines (or network drive). The html file is then used by the e-mail client to generate a signature whenever users choose to insert one.

Many thanks. Am going to give the zip solution a go and will post my results.
 
Top