Jump to content

How do I see if anything ... Aww just look, I don't know how to phrase this


Recommended Posts

Currently when my script starts it checks to see if one "area of information" (what is a more acurate word?) has been posted :

 

// if id provided, then delete that record
if (isset($_GET['id'])) {
    // create query to delete record
     $query = "DELETE FROM purchase WHERE sale_id = '{$_GET['id']}'";

 

How can I check to see if any area of information has been posted?

the main purpose of the page is to display a table and if the user clicks on a cell in the table, refresh the page showing all the records which also contain that information

 

code for the display

 

		echo $row[0];
	echo "<h1>category  location  price</h1>";
        echo "<table cellpadding=10 border=1>";
        while($row = $result->fetch_array()) {
            echo "<div id=\"navcontainer\">";
    	echo "<ul>";
            echo "<li><a href=#>".$row[2]."</li>";
    	echo "<li><a href=#>".$row[3]."</li>";
    	echo "<li><a href=#>$".$row[4]."</li>";
            echo "<li><a href=".$_SERVER['PHP_SELF']."?id=".$row[1].">x</a></li>";
            echo "</ul>";
		echo "</div>";

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.