Re: possible variable declaration error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 25, 2011 at 8:34 AM, Daniel Brown <danbrown@xxxxxxx> wrote:

> On Fri, Mar 25, 2011 at 08:24, Daniel Brown <danbrown@xxxxxxx> wrote:
>
>     And, now that I'm not on a three-inch screen, I can see that I
> didn't read your entire message, so my response appears rather idiotic
> --- because you already did the isset().  Sorry for that.
>
>    You're not even seeing your "it didn't work" error kick out?
>
> No problem, it is still early here on the East Coast.  No I dohave that
error message kicked out, I put it there as a test to try and isolate the
offending code block, which it did.  Now I just have to figure out how to
get it to work.  I understand your point with the GET so here is what I am
trying to do in the big picture.  I have a form with a drop down menu, for
now, where the user picks a value.  This value is sent using
AJAX(XMLHttpRequest) to the php script.  I want the script to grab this
value, run the prepared query with it and return a table structure again,
using AJAX( innerHTML).  I figured I would start small and try to get it
working with just simple values and then would move on to passing the values
to the script.  On the INSERT statements, I posted one below, I just bind
the value and then set it and it works fine with no errors or warnings,
thats why I am still scratching my head over the query.

//insert values into the default series table
$d_series = $db->prepare("INSERT INTO defaultseries (defaultseries,
publisher) VALUES (:defaultseries, :publisher)");  //SQL statement
$d_series->bindParam(':defaultseries', $defaultseries);  //bind the prepared
value to a php variable
$d_series->bindParam(':publisher', $publisher);//bind the prepared value to
a php variable

//the first row to be inserted
$defaultseries = 'Batman';  //declare the php variable
$publisher = 'DC Comics';  //declare the php variable
$d_series->execute();  //execute the prepared statement

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux