Thanks for that, yeah i should be more carefull before going to the list..
i'll watch out for it next time.

Jule

On Tuesday 30 April 2002 13:54, Miguel Cruz wrote:
> You're missing a closing quote on the assignment for $Query2.
>
> Come on people, keep your eyes open. This is basic stuff. Doesn't take
> any special genius to count quotes and braces.
>
> miguel
>
> On Tue, 30 Apr 2002, Jule wrote:
> > Hey guys, i'm writing this guestbook script for my site, and i'm getting
> > a random parse error where i think everything is normal, it gives it on
> > line 26 which is
> >
> > echo "Your entry will be posted!";
> >
> > my script follows
> >
> > Jule
> >
> > --SCRIPT--
> >
> > <?php
> >     $Guestbook["dateadd"] = date("F j, Y H:i:s");
> >     $Guestbook["name"] = trim($Guestbook["name"]);
> >     $Guestbook["town"] = trim($Guestbook["town"]);
> >     $Guestbook["email"] = trim($Guestbook["email"]);
> >     $Guestbook["website"] = trim($Guestbook["website"]);
> >     $Guestbook["favsong"] = trim($Guestbook["favsong"]);
> >     $Guestbook["comments"] = trim($Guestbook["comments"]);
> >     $Guestbook["mailinglist"] = trim($Guestbook["mailinglist"]);
> >
> >     $Host = "localhost";
> >     $User = "****";
> >     $Password = "*********";
> >     $DBName = "blindtheory";
> >     $TableName = "guestbook";
> >     $TableName2 = "mailinglist";
> >     $Pattern = ".+@.+..+";
> >     $Pattern2 = "(http://)?([^[:space:]]+)([[:alnum:]\.,-_?/&=])";
> >
> >     $Link = mysql_connect ($Host, $User, $Password);
> >     $Query = "INSERT into $TableName values('0', '$Guestbook[dateadd]',
> > '$Guestbook[name]', '$Guestbook[town]', '$Guestbook[email]',
> > '$Guestbook[website]','$Guestbook[favsong]', '$Guestbook[comments]')";
> >     $Link2 = mysql_connect ($Host, $User, $Password);
> >     $Query2 = "INSERT into $TableName2 values('0', '$Guestbook[dateadd]',
> > '$Guestbook[name]', '$Guestbook[email]');
> >
> >             if (mysql_db_query ($DBName, $Query, $Link)) {
> >                     echo "Your entry will be added";
> >             } else {
> >                     echo "There was an error in during the posting, please contact 
><a
> > href=\"mailto:[EMAIL PROTECTED]\";>me</a> and I will fix the
> > problem.<br>";
> >             }
> >
> >             if (isset($Guestbook[mailinglist])) {
> >
> >                     if (mysql_db_query ($DBName, $Query2, $Link2)) {
> >                             echo "Your e-mail address was sucessfully added to our 
>mailinglist";
> >                     } else {
> >                             echo "There was an error in during the posting, please 
>contact <a
> > href=\"mailto:[EMAIL PROTECTED]\";>me</a> and I will fix the
> > problem.<br>";
> >                     }
> >             }
> >     mysql_close ($Link);
> >     mysql_close ($Link2);
> > ?>

-- 
Jule Slootbeek
[EMAIL PROTECTED]
http://blindtheory.cjb.net

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to