Re: sending data to two tables.
| From: | Jule | Date: | Wed, 01 May 2002 03:48:34 +0000 |
| Subject: | Re: sending data to two tables. | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-95482@lists.php.net to get a copy of this message | ||
So it executed the first if:
if (mysql_db_query ($DBName, $Query, $Link)) {
echo "<p><p><p><p>Your
entry will be added<br>Click
<a
href=../index.php?left=guestbook&righttop=guestbook&rightbottom=guestbook&rttitle=mailinglist&rbtitle=gbadd>here</a>
to go back.<p><p><p><p>";
} else {
echo "There was an error in during the posting,
please contact <a
href=\"mailto:webmaster@blindtheory.cjb.net\">the
webmaster</a> and he will
fix the problem.<br>";
}
mysql_close ($Link);
but not the second one:
if (isset($Guestbook[mailinglist])) {
if (mysql_db_query ($DBName, $Query2, $Link)) {
echo "Your e-mail address was
sucessfully
added to our mailinglist";
} else {
echo "Your e-mail address will
not be added
to the mailinglist";
}
}
mysql_close ($Link);
and yes, i am sure the checkbox is checked.
Jule
On Tuesday 30 April 2002 23:43, you wrote:
> I don't know, every time i submit the form w/ the checkbox checked. it
> gives me the echo string which comes when the if is not executed..it adds
> the entries from the form to the guestbook table, but doesn't add the name
> and email to the mailinglist table. it doesn't give me any php or mysql
> errors.
>
> Jule
>
> On Tuesday 30 April 2002 23:35, you wrote:
> > On Wednesday 01 May 2002 07:34, Jule wrote:
> > > Hey,
> > > This time it's not about missing quotes or parenthasies i hope.
> > > I'm trying to make a form which sends name, email, website, favsong and
> > > comments to table guestbook, but when the checkbox mailinglist is
> > > checked it should send the name and email to table mailinglist, but it
> > > doesn;t seem to work.
> >
> > We're not physic! How doesn't it work?
--
Jule Slootbeek
jslootbeek@clarku.edu
http://blindtheory.cjb.net