This is all the sql I have in the code:
$sql = "INSERT INTO $table (firstname, lastname,
cpeyear, city, country, workplace, email, comments)
VALUES
('$firstname','$lastname','$cpeyear','$city','$country','$workplace','$email','$comments')";
$result = mysql_query($sql)or die("<br />Could not run
query Reason: ".
mysql_error());
echo "<br><br>Information entered into address
book.\n";
I tried hard-coding the enties and it succeeded:
<?php
include("include/dbconnect.php");
{
$sql = "INSERT INTO $table (firstname, lastname,
cpeyear, city, country, workplace, email, comments)
VALUES ('Peter','Long','1986','Leeds','United
Kingdom','Wallmart,'[EMAIL PROTECTED]','We just echoed
the field information into the value attribute of the
each element, which was fairly easy')";
$result = mysql_query($sql)or die("<br />Could not run
query Reason: ".
mysql_error());
echo "<br><br>Information entered into address
book.\n";
}
?>
--
dk wema
--- Ian Bambury <[EMAIL PROTECTED]> wrote:
> What is the actual SQL you end up with?
> Can you echo it and let me see?
> Ian
>
> On 18/11/05, D. K. Wema <[EMAIL PROTECTED]> wrote:
> >
> > --- Ian Bambury <[EMAIL PROTECTED]> wrote:
> >
> > > You could try looking at the error message...
> > > $result = mysql_query($sql)or die("<br />Could
> not
> > > run query Reason: " .
> > > mysql_error());
> >
> >
> > Thanks Ian,
> >
> > I tried with:
> >
> > $result = mysql_query($sql)or die("<br />Could not
> run
> > query Reason: " .
> > mysql_error());
> >
> > as you suggested but there's simply no output from
> the
> > db!
> >
> > --
> > dk wema
> >
> >
> >
> >
> > __________________________________
> > Yahoo! Mail - PC Magazine Editors' Choice 2005
> > http://mail.yahoo.com
> >
> >
> > Community email addresses:
> > Post message: [email protected]
> > Subscribe: [EMAIL PROTECTED]
> > Unsubscribe: [EMAIL PROTECTED]
> > List owner: [EMAIL PROTECTED]
> >
> > Shortcut URL to this page:
> > http://groups.yahoo.com/group/php-list
> >
> >
> > ------------------------------
> > YAHOO! GROUPS LINKS
> >
> >
> > - Visit your group
> "php-list<http://groups.yahoo.com/group/php-list>"
> > on the web.
> > - To unsubscribe from this group, send an
> email to:
> >
>
[EMAIL PROTECTED]<[EMAIL PROTECTED]>
> > - Your use of Yahoo! Groups is subject to the
> Yahoo! Terms of
> > Service <http://docs.yahoo.com/info/terms/>.
> >
> >
> > ------------------------------
> >
>
>
> [Non-text portions of this message have been
> removed]
>
>
__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com
------------------------ Yahoo! Groups Sponsor --------------------~-->
1.2 million kids a year are victims of human trafficking. Stop slavery.
http://us.click.yahoo.com/WpTY2A/izNLAA/yQLSAA/HKFolB/TM
--------------------------------------------------------------------~->
Community email addresses:
Post message: [email protected]
Subscribe: [EMAIL PROTECTED]
Unsubscribe: [EMAIL PROTECTED]
List owner: [EMAIL PROTECTED]
Shortcut URL to this page:
http://groups.yahoo.com/group/php-list
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/php-list/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/