+ Reply to Thread
Results 1 to 7 of 7

Thread: PHP script MAC issue

  1. #1
    commguy is offline x10Hosting Member commguy is an unknown quantity at this point
    Join Date
    Aug 2009
    Posts
    6

    PHP script MAC issue

    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>

  2. #2
    reviewsoft is offline x10Hosting Member reviewsoft is an unknown quantity at this point
    Join Date
    Aug 2009
    Posts
    8

    Re: PHP script MAC issue

    A 404 error? It's not a problem with your PHP coding then. Are you sure you have your PHP server set up right?

  3. #3
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,636

    Re: PHP script MAC issue

    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.
    Nothing is always absolutely so.

  4. #4
    commguy is offline x10Hosting Member commguy is an unknown quantity at this point
    Join Date
    Aug 2009
    Posts
    6

    Re: PHP script MAC issue

    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>

  5. #5
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,636

    Re: PHP script MAC issue

    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.
    Nothing is always absolutely so.

  6. #6
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: PHP script MAC issue

    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.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

  7. #7
    xav0989's Avatar
    xav0989 is offline Community Public Relation xav0989 is just really nice
    Join Date
    Jul 2008
    Location
    ifk
    Posts
    4,438

    Re: PHP script MAC issue

    Quote Originally Posted by misson View Post
    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.
    Xavier L | Community Public Relations Manager (Free Hosting Support)
    █ Yes, my position is too cool to even exist!
    How am I helping? Rate this post by clicking the icon below! (this is even better than "liking" a post)
    Terms of Service | Acceptable Use Policy | x10Hosting Wiki

+ Reply to Thread

Similar Threads

  1. currently have an application pending php
    By biomasti in forum Free Hosting
    Replies: 1
    Last Post: 09-03-2008, 01:58 PM
  2. Creating MySql database/table using php script
    By bushimports in forum Free Hosting
    Replies: 1
    Last Post: 02-02-2008, 12:43 AM
  3. Send Mail With Attachment [URL FILE] PHP Script
    By barun in forum Programming Help
    Replies: 1
    Last Post: 12-19-2007, 05:29 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers