#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    19
    Rep Power
    0
    Im getting a parse error on this script...can some help me...its a line 17.
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
    <?

    // Connect to local mySQL database
    //
    $db = mysql_connect("localhost", "online", "*******");

    //
    // Select your database
    //
    mysql_select_db("online", $db);

    //
    // Message to display when adding is complete
    //
    $msgdone = "<font face="Arial" size="2" color="Black">Success! Your Squadron has been added to the Database</font> <br>Your Listing is below.<br> Click <a href="http://www.cfsquad.com/php/view.php3?view=all">here</a> to view the rest of the Databaseprint "<table border="1" cellpadding="0" align="center" width="60%">"n;
    print "<tr><td rowspan="6">";
    print "<img src='$logo'></td>";
    print "<td><font face="Arial" size="2">Squadron Name:</font></td><td align="right"><font face="Arial" size="2">$squadname</font></td>n";
    print "</tr><tr>n";
    print "<td><font face="Arial" size="2">Squadron Contact:</font></td><td align="right"><font face="Arial" size="2"><a href="mailto:$contact">$co</a></font></td>n";
    print "</tr><tr>n";
    print "<td><font face="Arial" size="2">Squadron URL:</font></td><td align="right"><font face="Arial" size="2"><a href="$url">$url</a></font></td>n";
    print "</tr><tr>n";
    print "<td><font face="Arial" size="2">Short History:</font></td><td align="right"><font face="Arial" size="2">$shist</font></td>n";
    print "</tr><tr>n";
    print "<td><font face="Arial" size="2">C/O:</font></td><td align="right"><font face="Arial" size="2">$co</font></td>n";
    print "</tr><tr>n";
    print "<td><font face="Arial" size="2">Password:</font></td><td align="right"><font face="Arial" size="2">$pass</font></td>n";
    print "</tr>";
    print "</table>n";

    mail("$contact","Squadron Added",
    "Hello $co

    The Following information has been Updated at the Squadrons Database at Cfsquad.com

    Squadron Name:$squadname
    Squadron Contact: $contact
    Squadron URL: $URL
    Short History: $SHIST
    Commanding Officer: $CO
    Logo: $logo
    Password: $Pass This is not in use yet. When the editing feature is added you will need this to do so.)

    Thankyou,
    CFSquad.com
    webmaster@cfsquad.com", "From: webmaster@cfsquad.com")";

    //
    // using a query from te form helps out somewhat
    //
    if ($update == "yes")
    {
    //
    // this inserts a new "profile" into the fields selected. I automatically increments the ID number
    //

    $sql = "UPDATE squad_db SET SQUADNAME='$squadname', CONTACT='$contact', URL='$url', SHIST='$shist', CO='$co', PASS='$pass', LOGO='$logo' logo'

    $result = mysql_query($sql);
    //
    // Prints message if all goes well

    print("$msgdonen");
    }



    ?>
    </font>
    </td>
    </tr>


    </table></div>

    </body>
    </html>


    [/code]

    Thanks,
    Ryan
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2000
    Posts
    38
    Rep Power
    15
    well, this is just a long shot, but you could try using printf(); instead of just print " ";
    i'm not sure if it would make a difference, but it's worth a try
    *shrug*
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2000
    Posts
    43
    Rep Power
    15
    $msgdone = "<font face="Arial" size="2" color="Black">Success! Your Squadron has been added to the Database</font> <br>Your Listing is below.<br> Click <a href="http://www.cfsquad.com/php/view.php3?view=all">here</a> to view the rest of the Databaseprint "<table border="1" cellpadding="0" align="center" width="60%">"n;

    Problem is in the above line, you forgot to " the " before <table border...

    So everything afterwards looks like a string until some other quote!!!

    ------------------
    PHP, Perl, SQL Programming at http://www.mentalobjects.com
  6. #4
  7. .Net Developer
    Devshed Novice (500 - 999 posts)

    Join Date
    Feb 2000
    Location
    London
    Posts
    987
    Rep Power
    15
    <<$msgdone = "<font face="Arial" size="2" color="Black">Success! Your Squadron has been added to the Database</font> <br>Your Listing is below.<br> Click <a href="http://www.cfsquad.com/php/view.php3?view=all">here</a> to view the rest of the Databaseprint "<table border="1" cellpadding="0" align="center" width="60%">"n;
    >>

    also put the new line(n) inside the" ".


    $msgdone = "<font face="Arial" size="2" color="Black">Success! Your Squadron has been added to the Database</font> <br>Your Listing is below.<br> Click <a href="http://www.cfsquad.com/php/view.php3?view=all">here</a> to view the rest of the Databaseprint "<table border="1" cellpadding="0" align="center" width="60%">n";




    ------------------
    SR -
    shiju.dreamcenter.net
  8. #5
  9. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    19
    Rep Power
    0
    Thanks guys..I'll let you know how it turns out.


Similar Threads

  1. Replies: 2
    Last Post: August 18th, 2004, 10:45 PM
  2. How to see the Memory used by a PHP script?
    By Pardall in forum PHP Development
    Replies: 4
    Last Post: February 13th, 2004, 03:54 PM
  3. PHP with UnixODBC
    By coder4hire in forum PHP Development
    Replies: 2
    Last Post: January 20th, 2004, 01:14 PM
  4. Passing string from PHP to Javascript
    By ka8oad in forum JavaScript Development
    Replies: 4
    Last Post: January 17th, 2004, 03:12 PM
  5. UnixODBC + PHP + Apache + Empress
    By coder4hire in forum Database Management
    Replies: 0
    Last Post: January 15th, 2004, 01:41 PM

IMN logo majestic logo threadwatch logo seochat tools logo