V
ve_swan d
Guest
here is the link to the function where i get the searched items but i am not able to subscribe to books
say, if i select a book, i want to subscribe to it, and the tuples will be inserted in my subscription table
if i unsubscribe tuples will be deleted from my subscription table
<?php
mysql_connect("pdc-amd01.poly.edu","varanh01","p0396907");
mysql_select_db("varanh01");
$keyword = mysql_real_escape_string($_POST['keyword']);
// Perform the fulltext search
$query = "SELECT title, rating
FROM BOOK,rate_book
where BOOK.isbn=rate_book.isbn
AND BOOK.title LIKE '%$keyword%'
ORDER BY rating DESC";
$result = mysql_query($query);
// If results were found, output them
if (mysql_num_rows($result) > 0)
{
printf("<br/>Results: <br />");
while ($row = mysql_fetch_array($result)) {
printf("<br/><input type='checkbox' name='ch1' value='checkbox'>%s%s", ucfirst($row['title']),ucfirst($row['rating']));
}
} else
{
printf("No results found");
}
printf(" <br/><input type='submit' name='Subscribe' value='Subscribe'>");
$subscribe=$_GET['Subscribe'];
if(isset($subscribe))
{echo $subscribe;}
else{
printf("you havent subscribed for anything");}
LINK: pdc-amd01.poly.edu/~varanh01/search.html [click on the first blank box and it will take u to a series of books with checkbox books, where i want the selected books to be inserted in my subscription table in database],kindly help asap, its really important
say, if i select a book, i want to subscribe to it, and the tuples will be inserted in my subscription table
if i unsubscribe tuples will be deleted from my subscription table
<?php
mysql_connect("pdc-amd01.poly.edu","varanh01","p0396907");
mysql_select_db("varanh01");
$keyword = mysql_real_escape_string($_POST['keyword']);
// Perform the fulltext search
$query = "SELECT title, rating
FROM BOOK,rate_book
where BOOK.isbn=rate_book.isbn
AND BOOK.title LIKE '%$keyword%'
ORDER BY rating DESC";
$result = mysql_query($query);
// If results were found, output them
if (mysql_num_rows($result) > 0)
{
printf("<br/>Results: <br />");
while ($row = mysql_fetch_array($result)) {
printf("<br/><input type='checkbox' name='ch1' value='checkbox'>%s%s", ucfirst($row['title']),ucfirst($row['rating']));
}
} else
{
printf("No results found");
}
printf(" <br/><input type='submit' name='Subscribe' value='Subscribe'>");
$subscribe=$_GET['Subscribe'];
if(isset($subscribe))
{echo $subscribe;}
else{
printf("you havent subscribed for anything");}
LINK: pdc-amd01.poly.edu/~varanh01/search.html [click on the first blank box and it will take u to a series of books with checkbox books, where i want the selected books to be inserted in my subscription table in database],kindly help asap, its really important