SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Jun 2003
    Location
    ohio
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy parse error and I don't know why.....

    Can someone please help me? I'm getting serious pressure to get this stupid site done but I am stuck. I have never done any PHP scripting before and I am trying to make an email form that allows you to upload a graphic along with it. I found this script:
    http://www.hotscripts.com/cgi-bin/se...t&category=PHP (Form to email with Attachment).

    I customized it to include the fields that my form requires but it won't see the page. I've noticed when it has an .html extension it shows up ok but I don't know what that means. The actual page is at: http://www.usbusinessproperties.com/resources/index.php

    I've also uploaded the .html file so that you can see what the page is supposed to look like. It's at:
    http://www.usbusinessproperties.com/...ces/index.html

    If anyone could help me out I would be VERY grateful! Like I said, I have no idea what to do from here and this site's supposed to be up by tommorow.....

  2. #2
    SitePoint Enthusiast CamelToe's Avatar
    Join Date
    May 2003
    Location
    Canada
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Show us your code for lines 255 to 265 instead of the HTML.

    I'm sure we will help

  3. #3
    SitePoint Member
    Join Date
    Jun 2003
    Location
    ohio
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by CamelToe
    Show us your code for lines 255 to 265 instead of the HTML.

    I'm sure we will help
    CamelToe,
    If you can help me I would be so happy! Here's the code for lines 255 and 256 and then I included all the code below....

    255 (there's nothing on this line of code)
    256 <p><tr><td class="main">

    Here's all the code if this helps:

    <html>
    <head>
    <title>U.S. Business Properties Welcome</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">



    <style type="text/css">
    <!--
    .bdred {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: bold;
    color: #CC0000;
    }
    .main {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    font-weight: normal;
    color: #000000;
    }
    .redmain {
    font-family: Verdana, Arial, Helvetica, sans-serif;
    font-size: 12px;
    color: #CC0000;
    }
    -->
    </style>
    </head>


    <body bgcolor="#FFFFFF">

    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr align="center" valign="top">
    <td> <br>
    <table width="100%" border="0" cellspacing="0" cellpadding="0" name="logo">
    <!--DWLayoutTable-->
    <tr align="center" valign="middle">
    <td height="55"><center><IMG SRC="/online-store/scstore/graphics/logo.jpg"></td></tr>
    <P>

    <tr align="center" valign="middle"><td>&nbsp;</td>
    </tr></TABLE>

    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr align="left" valign="top"><td>








    <link rel=stylesheet href="formstyle.css">
    <script>
    function createCaret(textEl) {
    if (textEl.createTextRange)
    textEl.caretPos = document.selection.createRange().duplicate();
    }

    function insertCode(openTag, tagData, closeTag) {
    if (document.all.real_email_message.createTextRange && document.all.real_email_message.caretPos) {
    var caretPos = document.all.real_email_message.caretPos;
    caretPos.text = openTag+caretPos.text+closeTag;
    } else {
    document.all.real_email_message.value += openTag+tagData+closeTag;
    document.all.real_email_message.focus();
    }
    }

    function putButton(toolTip, textdis, openTag, tagData, closeTag) {
    document.write("<input class=fb type=button value=\"" +textdis+ "\" onClick=\"javascript:insertCode(\'"+openTag+"\', \'"+tagData+"\', \'"+closeTag+"\');\" onmouseover=\"document.all.tooltip.innerHTML='"+toolTip+"';\" onmouseover=\"document.all.tooltip.innerHTML='';\">");
    }

    function preview(){
    prewin=window.open('about:Please wait','prewin','width=500,height=440,top=0,left=0,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes');
    prewin.document.write("<title>Preview window</title><body bgcolor=#F0F0F0><font face=Verdana size=1><h4><b>Preview your message</b></h4><hr size=1 color=black>");
    prewin.document.write("<table border=0 width=99% cellspacing=1 cellpadding=8 bgcolor=gray><tr><td bgcolor=white width=100%><font face=Verdana size=1>");
    prewin.document.write(document.all.real_email_message.value);
    prewin.document.write("</td></tr></table>");
    }

    //putButton("Bold", "B", "<b>", "", "</b>");
    </script>
    <?
    /*
    -------------------------------------------------------
    FORM TO EMAIL WITH ATTACHMENT
    Version: 1.0
    Last update: 13,May,03
    -------------------------------------------------------
    Written by Minh Nguyen Duong (Obie)

    WWW: http://ObieWebsite.SourceForge.net
    Email: obie4web@yahoo.com

    Copyright Obie. All right reserved.
    -------------------------------------------------------
    Get more free PHP scripts and tutorials at ObieWebsite
    -------------------------------------------------------
    */
    include "config.php";
    ?>
    <title>Email to <?=$my_email;?></title>
    <p class=title></p>



    <form action="mail_module.php" method="post" ENCTYPE="multipart/form-data">

    <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=836>
    <!--DWLayoutTable-->
    <TR VALIGN=TOP><TD width="290" height="24">&nbsp;</TD>
    <TD width="444">&nbsp;</TD>
    <TD width="102">&nbsp;</TD>
    </TR>
    <TR VALIGN=TOP>
    <TD height="650">&nbsp;</TD>
    <TD valign="top"><TABLE BORDER=0 CELLPADDING=0 CELLSPACING=5>
    <!--DWLayoutTable-->
    <TR><TD HEIGHT=31 COLSPAN=3 VALIGN=TOP><P class="main">* All fields must be filled in.</P></TD></TR><TR><TD HEIGHT=75 colspan="3" VALIGN=TOP><p>
    <label>
    <input type="radio" name="sale/lease/rent" value="For Sale">
    <span class="main">For Sale</span></label>
    <br>
    <label>
    <input type="radio" name="sale/lease/rent" value="For Lease">
    <span class="main">For Lease</span></label>
    <br>
    <label>
    <input type="radio" name="sale/lease/rent" value="radio">
    <span class="main">For Rent</span></label>
    <br>
    </p></TD>
    </TR><TR><TD HEIGHT=50 COLSPAN=3 VALIGN=TOP><P>
    <label>
    <input type="radio" name="broker/individual" value="Real Estate Agent/Broker">
    <span class="main">Real Estate Agent/Broker</span></label>
    <span class="main">
    </span><br>
    <label>
    <input type="radio" name="broker/individual" value="radio">
    <span class="main">Individual</span></label>
    <span class="main">
    </span><br>
    </P>
    </TD>
    </TR>
    <TR>
    <TD WIDTH=107 HEIGHT=32 VALIGN=top class="main">State/TD>
    <TD colspan="2" VALIGN=TOP><P class="main">
    <select name="select">
    <option value="Alabama" selected>Alabama</option>
    <option value="Alaska">Alaska</option>
    <option value="Arizona">Arizona</option>
    <option value="Arkansas">Arkansas</option>
    <option value="California">California</option>
    <option value="Colorado">Colorado</option>
    <option value="Connecticut">Connecticut</option>
    <option value="Delaware">Delaware</option>
    <option value="District of Columbia">District of Columbia</option>
    <option value="Florida">Florida</option>
    <option value="Georgia">Georgia</option>
    <option value="Hawaii">Hawaii</option>
    <option value="Idaho">Idaho</option>
    <option value="Illinois">Illinois</option>
    <option value="Indiana">Indiana</option>
    <option value="Iowa">Iowa</option>
    <option value="Kansas">Kansas</option>
    <option value="Kentucky">Kentucky</option>
    <option value="Louisiana">Louisiana</option>
    <option value="Maine">Maine</option>
    <option value="Maryland">Maryland</option>
    <option value="Massachusetts">Massachusetts</option>
    <option value="Michigan">Michigan</option>
    <option value="Minnesota">Minnesota</option>
    <option value="Mississippi">Mississippi</option>
    <option value="Missouri">Missouri</option>
    <option value="Montana">Montana</option>
    <option value="Nebraska">Nebraska</option>
    <option value="Nevada">Nevada</option>
    <option value="New Hampshire">New Hampshire</option>
    <option value="New Jersey">New Jersey</option>
    <option value="New Mexico">New Mexico</option>
    <option value="New York">New York</option>
    <option value="North Carolina">North Carolina</option>
    <option value="North Dakota">North Dakota</option>
    <option value="Ohio">Ohio</option>
    <option value="Oklahoma">Oklahoma</option>
    <option value="Oregon">Oregon</option>
    <option value="Pennsylvania">Pennsylvania</option>
    <option value="Rhode Island">Rhode Island</option>
    <option value="South Carolina">South Carolina</option>
    <option value="South Dakota">South Dakota </option>
    <option value="Tennessee">Tennessee</option>
    <option value="Texas">Texas</option>
    <option value="Utah">Utah</option>
    <option value="Vermont">Vermont</option>
    <option value="Virginia">Virginia</option>
    <option value="Washington">Washington</option>
    <option value="West Virginia">West Virginia</option>
    <option value="Wisconsin">Wisconsin</option>
    <option value="Wyoming">Wyoming</option>
    </select>
    </P>
    </TD>
    </TR>

    <TR><TD HEIGHT=32 VALIGN=TOP><P class="main">County/P>
    </TD>
    <TD COLSPAN=2 VALIGN=TOP><P><INPUT NAME="req-county" id="req-county" SIZE=50 MAXLENGTH=12></P></TD></TR>

    <TR><TD HEIGHT=29 VALIGN=TOP><P class="main">City/P></TD><TD COLSPAN=2 VALIGN=TOP><P><INPUT NAME="req-city" id="req-city" SIZE=50></P></TD></TR>

    <TR><TD HEIGHT=109 VALIGN=TOP><P class="main">Description/P>
    </TD>
    <TD COLSPAN=2 VALIGN=TOP><P><TEXTAREA COLS=50 ROWS=5 NAME="req-description" WRAP="VIRTUAL"></TEXTAREA></P>
    </TD>
    </TR>
    <TR>
    <TD HEIGHT=55 VALIGN=top class="main">Available Square Footage/TD>
    <TD COLSPAN=2 VALIGN=top><INPUT NAME="req-footage" id="req-footage" SIZE=50 MAXLENGTH=12></TD>
    </TR>

    <TR>
    <TD HEIGHT=48 VALIGN=top class="main">Asking Price/TD>
    <TD COLSPAN=2 VALIGN=top><INPUT NAME="req-price" id="req-price" SIZE=50 MAXLENGTH=12>
    </TD>
    </TR>
    <TR>
    <TD HEIGHT=46 VALIGN=top class="main">Contact Person/TD>
    <TD COLSPAN=2 VALIGN=top><INPUT NAME="req-contact" id="req-contact" SIZE=50 MAXLENGTH=12></TD>
    </TR>
    <TR>
    <TD HEIGHT=26 VALIGN=top class="main">Email/TD>
    <TD COLSPAN=2 VALIGN=top><INPUT NAME="req-email" id="req-email" SIZE=50 MAXLENGTH=12>
    </TD>
    </TR>
    <TR>
    <TD HEIGHT=27 VALIGN=top class="main">Phone/TD>
    <TD COLSPAN=2 VALIGN=top><INPUT NAME="req-phone" id="req-phone" SIZE=50 MAXLENGTH=50></TD>
    </TR>

    <tr bgcolor='E4C976'><td colspan='3' height='2'></td></tr>

    <INPUT TYPE=HIDDEN NAME="success" VALUE="http://www.usbusinessproperties.com/online-store/scstore/scpages/postordr.html"></P></TD></TR>
    <tr>
    <td height="1"></td>
    <td width="6"></td>
    <td></td>
    </tr>


    <p><tr><td class="main">

    <?
    print("
    <p>ATTACHMENT FILE <input class=fi name="upfile" type="file" id="upfile"><br>

    <p><input class=fb type="submit" value=">> Send email"> <input class=fb type=reset><INPUT TYPE=HIDDEN NAME="success" VALUE="http://www.usbusinessproperties.com/online-store/scstore/scpages/postordr.html">


    <font size=1 color=gray>[MODE :
    <?
    if($mail_mode==0) echo "Anonymous HTML form mail with attachment file";
    else if($mail_mode==1) echo "HTML form mail with attachment file";
    ?>
    ]</font>
    </td></tr></table>
    </form>

  4. #4
    SitePoint Enthusiast CamelToe's Avatar
    Join Date
    May 2003
    Location
    Canada
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    <p><tr><td class="main">

    <?
    print("
    <p>ATTACHMENT FILE <input class=fi name="
    upfile" type="file" id="upfile"><br>

    <p><input class=fb type="
    submit" value=">> Send email"> <input class=fb type=reset><INPUT TYPE=HIDDEN NAME="success" VALUE="http://www.usbusinessproperties.com/online-store/scstore/scpages/postordr.html">


    <font size=1 color=gray>[MODE :
    <?
    if(
    $mail_mode==0) echo "Anonymous HTML form mail with attachment file";
    else if(
    $mail_mode==1) echo "HTML form mail with attachment file";
    ?>
    It looks as though you didn't close out your

    ?> and a ") for your print() function.

    I'm referring to this line:

    Code:
    <?
    print("
    Which would be about lines 268 or something.

  5. #5
    Non-Member coo_t2's Avatar
    Join Date
    Feb 2003
    Location
    Dog Street
    Posts
    1,819
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by CamelToe
    It looks as though you didn't close out your

    ?> and a ") for your print() function.

    I'm referring to this line:

    Code:
    <?
    print("
    Which would be about lines 268 or something.
    It's easy to make mistakes like that.
    Two simple things can help catch problems like that.

    1. put following line at top of script during development/debugging:

    error_reporting(E_ALL);

    2. Use a good text editor with good PHP syntax highlighting, like
    editPlus .


    Another thing is, you're gonna have to escape the double quotes ( " ) in your print
    statement. Or enclose the text to print in single quotes ( ' ).
    In this case I think you'd be better off enclosing your text in single quotes.

    But really, I don't see any PHP variables in the text you wanna print.
    Why not just make it plain html and forget the print statement?

    --ed

  6. #6
    SitePoint Member
    Join Date
    Jun 2003
    Location
    ohio
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the info. I've gotten it worked out now. Thanks again...


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •