*Updated* I didn't prepare other Select, all that I did for the exercise is in the code posts. I thought about what you said and I thought that probably bind_column was useless because I just wanted print the values of the variables presents in the table and maybe it's not important to bind them to columns so, trying to think in a simpler way, I removed the while cycle and the subsequent fetch replacing them with a simple print of variables.
I also changed the assigment of keywords inserted in the form html of the first script to the variables in databaseLWP(the script that I'm modifying) in a more correct way, now the reply-page returns the correct valor(except id), but not from table, just from html form, in fact the id value isn't shows.
At least I found the bug that caused the problem with inclusion of the value in databases and was the mysql syntax in the query(I missed the '' near the names of values), a common beginner mistake, but I also changed the ? with directly name of the variables because if I didn't it the query inserted only ? instead of values.
With these modifications the script now puts the value in the database but without enough security in my opinion, what do you suggest?

(...) #prepare the query my $sql = "INSERT INTO prodotti (nome_prod , tipologia_prod) VALUES (' +$key_nome_prod' , '$key_tipo_prod' )" ; my $sth = $dbh->prepare( $sql ); #$sth->bind_param( $key_nome_prod , $key_tipo_prod ); (...) print "<i>La lista aggiornata dei prodotti presenti nel database negoz +i è:</i> <br><br>"; print " ============================================================== +===== <br><br>"; print "<i>Id del prodotto=</i><b> $id_prod </b>,<i> il nome del prodot +to è</i><b> $key_nome_prod </b> della tipologia $key_ti$


In reply to Re^2: Bind and fetch fails by Eirinya
in thread [SOLVED]Bind and fetch fails by Eirinya

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.