Random (but not really)

Tuesday, February 24, 2009

Still Writing!

But still not, like, fiction writing.

// function to add/update reviews

function update_reviews($book_ID, $Review)
{
$query_review = “UPDATE books
SET Review = ‘$Review’, Status = ‘$Status’
WHERE book_ID = ‘$book_ID'”;
$result_review = mysql_query($query_review);
}

// create the query to add the review web address

$a = 1;
WHILE ($a <= $r) { $book_ID = $_POST['book_ID'.$a]; $Review = $_POST['Review'.$a]; $Status = $_POST['Status'.$a]; $Review_updated = update_reviews($book_ID, $Review, $Status); $a++; } $a = $a - 1;

Of course after two days of fighting with it, Michael fixed my concatenation: $book_ID = $_POST[‘book_ID’.$a];. I tried everything under the sun but that.

However, it all works now, which is all that’s important.

And of course this is all for the back end/management of my book database. You all don’t get to play around in the back end–no offense, but I don’t need anyone else adding or editing books.

Powered by WordPress

This is text at the bottom of the page.

Discover more from Random (but not really)

Subscribe now to keep reading and get access to the full archive.

Continue reading