I don't know why I am trying this I may be able to find the answer if any one even answers. This is a question about making an update work. This is for a non profit food pantry where we are trying to track the visitors here is the whole script. It seems like you are picky about how much a person puts in but I have no other idea how to do this.
#!/usr/bin/perl -wc # vitals1u.cgi use CGI ":standard"; use DBI; use strict; use CGI::Carp qw( fatalsToBrowser ); my $dbh = DBI->connect("DBI:mysql:interchange:", 'fang', '7864221a'); # get the posted data my $id = param('id') || ' '; my $lnamek = param('lnamek') || ' '; my $fname = param('fname') || ' '; my $lname = param('lname') || ' '; my $address = param('address') || ' '; my $apt = param('apt') || ' '; my $city = param('city') || ' '; my $state = param('state') || ' '; my $zip = param('zip') || ' '; my $dob = param('dob') || ' '; my $men = param('men') || ' '; my $women = param('women') || ' '; my $boys = param('boys') || ' '; my $girls = param('girls') || ' '; my $sth = $dbh->prepare("UPDATE vitals1 SET id = ?, lnamek = ?, fna +me = ?, lname = ?, address = ?, apt = ?, city = ?, state = ?, zip = ?, dob = ?, men = ?, women = ?, boys = ?, girls = ?"); $sth->bind_param(1, $id); $sth->bind_param(2, $lnamek); $sth->bind_param(3, $fname); $sth->bind_param(4, $lname); $sth->bind_param(5, $address); $sth->bind_param(6, $apt); $sth->bind_param(7, $city); $sth->bind_param(8, $state); $sth->bind_param(9, $zip); $sth->bind_param(10, $dob); $sth->bind_param(11, $men); $sth->bind_param(12, $women); $sth->bind_param(13, $boys,); $sth->bind_param(14, $girls); or die "Could not prepare SQL: " . $dbh->errstr(); $sth->execute(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14); or die "Could not execute SQL: " . $dbh->errstr(); $sth->finish(); $dbh->disconnect();
I then get this king of feedback from the program.
interchange:/panix/apache/cgi-bin # perl vitals1u.cgi ?id=1234&lnamek= +glitz&fname=Gladdy&lname=Glitz&address=456+N.+astrakahn&apt=77&city=M +ilwaukee&state=WI&zip=53488&dob=19330501&men=1&women=2&boys=&girls=&S +ubmit=Submit [1] 7966 [2] 7967 [3] 7968 [4] 7969 [5] 7970 [6] 7971 [7] 7972 [8] 7973 [9] 7974 [10] 7975 [11] 7976 [12] 7977 [13] 7978 [14] 7979 [2] Done lnamek=glitz [3] Done fname=Gladdy [4] Done lname=Glitz [5] Done address=456+N.+astrakahn [6] Done apt=77 [7] Done city=Milwaukee [8] Done state=WI [9] Done zip=53488 [10] Done dob=19330501 [11] Done men=1 [12] Done women=2 [13] Done boys= [14] Done girls= interchange:/panix/apache/cgi-bin # Content-type: text/html <h1>Software error:</h1> <pre>syntax error at vitals1u.cgi line 48, near &quot;or&quot; vitals1u.cgi had compilation errors.
I don't have a lot of faith in this methodology to work my e mail is davidfulwiler@sbcglobal.net the web site this is from is http://interchangemilwaukee.org give me a hand if you like. Dave

2006-06-27 Retitled by Corion, as per Monastery guidelines
Original title: 'DBI::MYSQL::st'


In reply to tracking a syntax error (DBI::MYSQL::st) by fulwilerdavid

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.