Note that there are some explanatory texts on larger screens.

plurals
  1. POHelp with Php / Mysql form to delete books from db
    primarykey
    data
    text
    <p><em>Anyone??</em></p> <p><em><strong></em> Updated code</strong> The problem seems to be it isnt pulling anything from the database. Do you see any error in the php? Like nothing is being pulled at all. I'm trying <em>title</em> search for 'jQuery' and it isnt showing anything</p> <p>p2.php</p> <pre><code>&lt;html&gt; &lt;style type="text/css"&gt; input{font-size:1.4em;-moz-border-radius-topright: 10px; -moz-border-radius-topleft: 10px; -moz-border-radius-bottomright: 10px; -moz-border-radius-bottomleft: 10px; -webkit-border-top-right-radius: 10px; -webkit-border-top-left-radius: 10px; border-botton-left-radius: 10px; border-bottom-right-radius: 10px; border:1px solid #4186d3; color:#666;} &lt;/style&gt; &lt;body&gt; &lt;fieldset&gt; &lt;legend&gt;&lt;h3&gt;Delete a book&lt;/h3&gt;&lt;/legend&gt; &lt;form action="p2send.php" method="post"&gt; &lt;strong&gt;Select a Search Type&lt;/strong&gt; &lt;select name="searchtype"&gt; &lt;option value="Author"&gt;Author&lt;/option&gt; &lt;option value="ISBN"&gt;ISBN&lt;/option&gt; &lt;option value="Title"&gt;Title&lt;/option&gt; &lt;/select&gt; &lt;br&gt; &lt;input type="text" name="searchBox" /&gt; &lt;br&gt; &lt;input type="submit" name="send" /&gt; &lt;/form&gt; &lt;/fieldset&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>p2send.php:</p> <pre><code>&lt;?php $con = mysql_connect("localhost","root","Jacked.1988"); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("bookorama", $con); // declare variables for select types $titlevar = mysql_real_escape_string($_POST['bookTitle']); $authorvar= mysql_real_escape_string($_POST['author']); $isbnvar = mysql_real_escape_string($_POST['isbn']); $pricevar = mysql_real_escape_string($_POST['price']); // sql queries to run depending on selected $sql="SELECT * FROM books WHERE title='$titlevar'"; $sql="SELECT * FROM books WHERE author='$authorvar'"; $sql="SELECT * FROM books WHERE isbn='$isbnvar'"; $res = mysql_query($sql,$con); $result1 = mysql_fetch_assoc($res); $result1 = mysql_fetch_assoc($res); if (!mysql_query($sql,$con)) { die('Error: ' . mysql_error()); } echo "Books to delete that matched your query:&lt;br&gt;&lt;br&gt;&lt;input type='checkbox' name='book'&gt; &lt;strong&gt;Title:&lt;/strong&gt; $titlevar &lt;br&gt; &lt;strong&gt;Author:&lt;/strong&gt; $authorvar &lt;br&gt; &lt;strong&gt;ISBN:&lt;/strong&gt; $isbnvar &lt;br&gt; &lt;strong&gt;Price:&lt;/strong&gt; $pricevar " . "&lt;br&gt;"; mysql_close($con) ?&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload