PHP script MAC issue

commguy

New Member
Messages
6
Reaction score
0
Points
0
Hi guys. I have a simple form that echo's the data to a savable html file. It works fine on a PC but Mac users keep getting a 404 error. Does anyone have an idea of why this might be happening?

Many thanks.

Here's the code for the script:

<?php
header('Content-type: application/htm');
header('Content-Disposition: attachment; filename="signature.htm"');
?>
<html>
<body>
<font size="2" face="Arial">
________________________________________
<br />
<span style="text-transform: uppercase">
<br /><?php echo $_POST["fname"]; ?></span><b></b><span style="text-transform: uppercase">
</span>
<br /><?php echo $_POST["title"]; ?>
<br />
<br /></font><b></b><font size="2" face="Arial">101 Saveda Blvd. | Torrance, CA 90505<br />
</b><?php echo $_POST["phone"]; ?> <?php echo $_POST["fax"]; ?> <?php echo $_POST["mobile"]; ?><br>
<span style="color:#DE2020">
<a href="http://www.company.com" style="text-decoration: none">
<font color="#DE2020">companyl.com
</font></a>
<br />
<br />
</span></font><font face="Arial">
<img border="0" src="company.jpg" width="90" height="53"><br />
<font color="#666666"><br />
</font><font size="1"><font color="#333333">
<img border="0" src="twit.jpg" 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.jpg" width="15" height="15">&nbsp;
</font>
<a href="http://www.facebook.com">
<font color="#333333">Join Facebook</font></a></font></font>

</body>
</html>
 

reviewsoft

New Member
Messages
8
Reaction score
0
Points
0
A 404 error? It's not a problem with your PHP coding then. Are you sure you have your PHP server set up right?
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
404 means the server cannot find your script using the information the browser sent.

I haven't heard of any differences between MAC and PC in this area, but post the code for the form that submits the info to the above script.
 

commguy

New Member
Messages
6
Reaction score
0
Points
0
Sorry, I should have included the form code as well.

Here's the link to the working document:
http://trainacomm.exofire.net/signature/signature.htm

SIGNATURE.HTM CODE:

<html>
<body>
<form action="welcome.php" method="post" target="_blank.htm">
<font face="Arial">
<img border="0" src="logo.gif" width="100" height="59">&nbsp;
</font>
<b><font face="Arial">E-Mail Signature Generator<br>
</font></b><font face="Arial" size="2"><b><br>
Instructions:<br>
<br>
</b>1. REMINDER: make certain that you created the mysignature folder on your
computer and saved the files sent to you..<br>
<br>
2. Enter your information in the below form and click on submit. When prompted,
save the file to the <i>mysignature</i> folder you created in step 1.</font><p>
<font face="Arial" size="2">Your signature will then be complete and ready to
use.<br>
</font>
<font size="2"><font face="Arial"><br>
</font>
<br>
</font><font face="Verdana"><font size="2"><b>Name:&nbsp;</b> </font>
<input type="text" name="fname" size="39" /><font size="2">&nbsp; <b>Please use ALL
CAPS for your name</b><br>
<br>
<b>Title:&nbsp;</b>&nbsp;&nbsp; </font> <input type="text" name="title" size="39" /><font size="2">
(Mandatory)<br>
<br>
<b>Phone:</b> </font> <input type="text" name="phone" size="39" value="P +1-" /><font size="2">
(Mandatory)<br>
<br>
<b>Fax:&nbsp;</b>&nbsp;&nbsp;&nbsp; </font>
<input type="text" name="fax" size="39" value="| F +1-" /><font size="2">
(Mandatory)<br>
<br>
<b>Mobile: </b></font>
<input type="text" name="mobile" size="39" value="| M +1-" /><font size="2"> (If
you don not wish to include a mobile number, please delete everything in the
field to the left.)
<br>
<br><a href="download.php"
target="_blank
</font></font><font size="2"><br>
</font>
<input type="submit" value="SUBMIT" /><font size="2"> </font>
</p>
</form>
</body>
</html>
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
target="_blank.htm"

The 'standard' is '_blank' to open a new window. Not sure if that is the issue. Google shows a few older problems with the 'target' attribute on IE for MAC.
 

misson

Community Paragon
Community Support
Messages
2,572
Reaction score
72
Points
48
Your links to "download.php" are missing a closing quote for the "target" attribute.

Why did you place the form submission button in a link? On Safari, this results in 2 pages being opened: /signature/welcome.php, which creates the signature, and /signature/download.php, which doesn't exist. It's the latter which is producing the 404.
 

xav0989

Community Public Relation
Community Support
Messages
4,467
Reaction score
95
Points
0
Your links to "download.php" are missing a closing quote for the "target" attribute.

Why did you place the form submission button in a link? On Safari, this results in 2 pages being opened: /signature/welcome.php, which creates the signature, and /signature/download.php, which doesn't exist. It's the latter which is producing the 404.
That seems to be the problem, as I an getting an 404 error as well, even though I am using Firefox 3.51 under Windows.
What I'm about to say might seem harsh, but you should read a couple tutorial on html, xhtml, and css.
I recommend google and W3Schools.
 
Top