PHP help - customised user queries!!!!

dragon2309

P.I Dragon
hey everyone, this is a special callout to people lik cromewell and mgoldb2 and basically anyone who knows PHP well. Below is my current page, you can see it at http://www.simplytrue.co.uk/stocklist/query3.php Obviously its not working jsut rught, lol.

There are several records for each of the selcetions but none get returned etc... its easier if you click the link and see for yourself. As said the code is below and i have no clue what to do with it, ive spen the last 2 hours fiddling and changing but nothign works properly

PHP:
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>price Query</title>
</head>

<body>
</head>
 <body>
 
   <h1>price Query</h1>
   
   <form id="price_select" action="<?php $PHP_SELF; ?>" method="post">
   <p>
     Select price:
     <select name="price">
       <option value="£1.99">£1.99</option>
       <option value="£2.99">£2.99</option>
       <option value="£3.99">£3.99</option>
     </select>
 
     <input type="submit" />
   </p>
   </form>
 
   <?php
     if( ! empty( $_POST["price"] ) )
     {
       echo '<table border="1">
     <tr>
       <th><font face="Tahoma">Item Number</font></th>
       <th><font face="Tahoma">Description</font></th>
       <th><font face="Tahoma">Price</font></th>
       <th><font face="Tahoma">Image</font></th>
       <th><font face="Tahoma">Information</font></th>
       <th bgcolor="#FFECFF">&nbsp;</th>
       <th>Item Number</th>
       <th>Description</th>
       <th>Price</th>
       <th>Image</th>
       <th>Information</th>
     </tr>


    </div>



     <tr>
       <td bgcolor="#FFECFF">&nbsp;</td>
       <th bgcolor="#FFECFF">&nbsp;</th>
       <th bgcolor="#FFECFF">&nbsp;</th>
       <th bgcolor="#FFECFF">&nbsp;</th>
       <th bgcolor="#FFECFF">&nbsp;</th>
       <th bgcolor="#FFECFF">&nbsp;</th>
       <th bgcolor="#FFECFF">&nbsp;</th>
       <th bgcolor="#FFECFF">&nbsp;</th>
       <th bgcolor="#FFECFF">&nbsp;</th>
       <th bgcolor="#FFECFF">&nbsp;</th>
       <th bgcolor="#FFECFF">&nbsp;</th>
     </tr>';
 
       require "dbinfo.php";
 
       // Connect to MySQL DBMS
       if (!($connection = @ mysql_connect(DB_HOSTNAME, DB_USERNAME, DB_PASSWORD)))
         showerror();
 
       // Use the cars database
       if (!mysql_select_db(DB_DATABASENAME, $connection))
         showerror();
 
       // Create SQL statement
       $price = $_POST["price"];
 
       $query = "SELECT * FROM ad_brac WHERE Price='$price'";
 
       // Execute SQL statement
       if (!($result = @ mysql_query ($query, $connection)))
         showerror();
 
       // Display results
       
       // starts counter at 0
       $counter=0;
       while ($row = @ mysql_fetch_array($result))
       
               // checks if counter/2 has no remainder, as in 0 (first item), 2 (third item), and, if so, starts a row 
    if($counter % 2 == 0){
        echo "<tr>";
        } 
       
         echo "<td>{$row['StockCode']}</td>
       <td>{$row['Description']}</td>
       <td>{$row['Price']}</td>
       <td><p><a href='{$row['IMGURL']}'><img src='{$row['IMG']}'></img></p></td>
       <td><center><a href='{$row['URL']}'>$row[url]</a></center></td>";
 
       echo "</table>";
       
               // checks if counter+1/2 has no remainder, as in 1 (2nd item), 3 (fouth item), and, if so, ends a row 
    if(($counter+1) % 2 == 0){
        echo "</tr>";
        }
        else
{ echo '<td bgcolor="#FFECFF">&nbsp;&nbsp;</td>';}
        // adds one to the counter
        $counter++; 

     }
   ?>
</body>

</html>
any help or tips woudl be really great indeed, thanks

dragon
 

apj101

VIP Member
well at first glance the syntax seems ok, how are you storing price in you database? are you storing it as £1.99 or 1.99

If another php god doesnt help i'll go over the syntax more carefully
 

dragon2309

P.I Dragon
hey apj, thanks for the reply, in the db price is being sotored as £1.99 so thats all ok. Im not entirely sure why its doing this, ive been over it hundreds of times now, and i know my PHP skills are limited but it cant find anythign thats wrong or causes conflict. Oh end yes, the Price entity in the db is named "Price" not "price" (case sensitive), so thats ok aswell

thanks for your help.

draogn
 

apj101

VIP Member
i had a little more detailed look, i cant see your declaration of the showerror function something like
function showerror()
{
die("Error".mysql_errorno() .":" . mysql_error());
}

we should also look to build in some error checking to see if how we are getting data back from the server, just try echoing out
echo $row["StockCode"]
after
while ($row = @ mysql_fetch_array($result))

comment out all the table writing stuff to leave just the one echo within the while loop, and you will see if any results are coming back (helps pin down the issue)
 

dragon2309

P.I Dragon
ok, well, you did kinda lose me in all that, but i stumbled across soemthing that i forgot. if you go to http://www.simplytrue.co.uk/stocklist/query.php you can see one of the early versions, basically the same, but it doesnt have the whole bit about dropping a new line after 2 records andputting a blank column in the middle.

The code for that page is:

PHP:
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>price Query</title>
</head>

<body>
</head>
 <body>
 
   <h1>price Query</h1>
   
   <form id="make_select" action="<?php $PHP_SELF; ?>" method="post">
   <p>
     Select price:
     <select name="price">
       <option value="£1.99">£1.99</option>
       <option value="£2.99">£2.99</option>
       <option value="£3.99">£3.99</option>
     </select>
 
     <input type="submit" />
   </p>
   </form>
 
   <?php
     if( ! empty( $_POST["price"] ) )
     {
       echo '<table border="1">
     <tr>
       <th><font face="Tahoma">Item Number</font></th>
       <th><font face="Tahoma">Description</font></th>
       <th><font face="Tahoma">Price</font></th>
       <th><font face="Tahoma">Image</font></th>
       <th><font face="Tahoma">Information</font></th>
       <th bgcolor="#FFECFF">&nbsp;</th>
       <th>Item Number</th>
       <th>Description</th>
       <th>Price</th>
       <th>Image</th>
       <th>Information</th>
     </tr>


    </div>



     <tr>
       <td bgcolor="#FFECFF">&nbsp;</td>
       <th bgcolor="#FFECFF">&nbsp;</th>
       <th bgcolor="#FFECFF">&nbsp;</th>
       <th bgcolor="#FFECFF">&nbsp;</th>
       <th bgcolor="#FFECFF">&nbsp;</th>
       <th bgcolor="#FFECFF">&nbsp;</th>
       <th bgcolor="#FFECFF">&nbsp;</th>
       <th bgcolor="#FFECFF">&nbsp;</th>
       <th bgcolor="#FFECFF">&nbsp;</th>
       <th bgcolor="#FFECFF">&nbsp;</th>
       <th bgcolor="#FFECFF">&nbsp;</th>
     </tr>';
 
       require "dbinfo.php";
 
       // Connect to MySQL DBMS
       if (!($connection = @ mysql_connect(DB_HOSTNAME, DB_USERNAME, DB_PASSWORD)))
         showerror();
 
       // Use the cars database
       if (!mysql_select_db(DB_DATABASENAME, $connection))
         showerror();
 
       // Create SQL statement
       $price = $_POST["price"];
 
       $query = "SELECT * FROM ad_brac WHERE Price='$price'";
 
       // Execute SQL statement
       if (!($result = @ mysql_query ($query, $connection)))
         showerror();
 
       // Display results
       while ($row = @ mysql_fetch_array($result))
         echo "<td>{$row['StockCode']}</td>
       <td>{$row['Description']}</td>
       <td>{$row['Price']}</td>
       <td><p><a href='{$row['IMGURL']}'><img src='{$row['IMG']}'></img></p></td>
       <td><center><a href='{$row['URL']}'>$row[URL]</a></center></td>";
 
       echo "</table>";
     }
   ?>
</body>

</html>

and taht works, to a certain degree, if you select £2.99 you can see the problem, so by that ive kinda derrived that the whole extra bit with the counter and the column in the middle is at fault, any help....

dragon
 

apj101

VIP Member
Yep that sounds like the problem, and i guess that where the issue was

I quickly pulled this together for you, give it a try. I dont have a debugger on this lappy so there may be a ; missing here or there :)

PHP:
// starts counter at 0
       $counter=-1; 
	while ($row = @ mysql_fetch_array($result))
       {

       if($counter == 2){//this will tell us we already have 2 items in the row so start a new row
		echo "</tr>";//close the old row
		$counter=0; //reset the counter as we will now be starting a new row
		echo "<tr>";//start a new row
	}
	
	if ($counter == -1) {
		//this code will only action on the first time through, after that counter will hold values on 0,1,or 2
		$counter=0; //reset the counter to begin
		echo "<tr>";//start the first row of the results
	}

        if($counter < 2){ //if we already have 2 items in the row then we need to start a new row
        

       		echo "<td>{$row['StockCode']}</td>
       		<td>{$row['Description']}</td>
       		<td>{$row['Price']}</td>
       		<td><p><a href='{$row['IMGURL']}'><img src='{$row['IMG']}'></img></p></td>
       		<td><center><a href='{$row['URL']}'>$row[url]</a></center></td>";

		if ($counter == 1) echo "<td>&nbsp;</td>"; //do this to ensure a nice space between the two coloumn
	
		$counter++; //increment the counter to show we have added one item to the current row
	}
	}//end of while loop
	
	//so now we are out of the while loop, we need to assess how the table ended. how many items are in the last row
	//if there is only one then we need to flesh out the second item in that row is &nbsp; to make it look good
	if ($counter==1){
	echo "	<td>&nbsp;</td>
       		<td>&nbsp;</td>
       		<td>&nbsp;</td>
       		<td>&nbsp;</td>
       		<td>&nbsp;</td>";
	}	
		
 
       echo "</td></table>";
 

dragon2309

P.I Dragon
wow, that was quick apj, thanks, upon testing i recieve this error, once again i dont see anythign major wrong with it... can you?

" Parse error: parse error, unexpected $ in /home/simplytrue/public_html/stocklist/query5.php on line 132"

its strange because line 132 is copletely out of the PHP block, its after tha page ends. this page is located at www.simplytrue.co.uk/stocklist/query5.php

thanks for your time. dragon :D

*EDIT* - ok i fixed it (missing "}" at the end) and it kinda works, the spaces are in the wrong place, lol, is this simple again or am i missuing somethign, link is above

*EDIT* - ok, on closer inspection, i see its not actually echoing the INFORMATION column. this is wierd cos it IS in the echo part of the PHP block, its the "URL" row, the last one beign echoed, strange..... any ideas...

dragon
 
Last edited:

apj101

VIP Member
the problem i think may be something to do with the way in which you database is storing the $row the data in the database must incl...>$row[url]</center></td>"; does that fix it?
 

dragon2309

P.I Dragon
hi, firstly, the database does store the URL with <a href bit, because i include the text "Click Here for more information" as the bit to click on... secondly, i changed the line to the strippe down version you gave and still the same thing, i uploaded it as query6.php, located at www.simplytrue.co.uk/stocklist/query6.php

this is a bit confusing.....
 

dragon2309

P.I Dragon
ok, sorry about that, but now putting my debuggin skills into action, that line should have read....

<td><center>{$row['URL']}</center></td>";

anyway, thats sorted that problem out now, page located at http://www.simplytrue.co.uk/stocklist/query6.php the URL bit is echoed properly, but the gap inbetween the two columns has becom e non existent, which is strange becaus ei havent changed anything to do with that part of it.....

code of current page:

PHP:
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>price Query</title>
</head>

<body>
</head>
 <body>
 
   <h1>price Query</h1>
   
   <form id="make_select" action="<?php $PHP_SELF; ?>" method="post">
   <p>
     Select price:
     <select name="price">
       <option value="£1.99">£1.99</option>
       <option value="£2.99">£2.99</option>
       <option value="£3.99">£3.99</option>
     </select>
 
     <input type="submit" />
   </p>
   </form>
 
   <?php
     if( ! empty( $_POST["price"] ) )
     {
       echo '<table border="1">
     <tr>
       <th><font face="Tahoma">Item Number</font></th>
       <th><font face="Tahoma">Description</font></th>
       <th><font face="Tahoma">Price</font></th>
       <th><font face="Tahoma">Image</font></th>
       <th><font face="Tahoma">Information</font></th>
       <th bgcolor="#FFECFF">&nbsp;</th>
       <th>Item Number</th>
       <th>Description</th>
       <th>Price</th>
       <th>Image</th>
       <th>Information</th>
     </tr>


    </div>



     <tr>
       <td bgcolor="#FFECFF">&nbsp;</td>
       <th bgcolor="#FFECFF">&nbsp;</th>
       <th bgcolor="#FFECFF">&nbsp;</th>
       <th bgcolor="#FFECFF">&nbsp;</th>
       <th bgcolor="#FFECFF">&nbsp;</th>
       <th bgcolor="#FFECFF">&nbsp;</th>
       <th bgcolor="#FFECFF">&nbsp;</th>
       <th bgcolor="#FFECFF">&nbsp;</th>
       <th bgcolor="#FFECFF">&nbsp;</th>
       <th bgcolor="#FFECFF">&nbsp;</th>
       <th bgcolor="#FFECFF">&nbsp;</th>
     </tr>';
 
       require "dbinfo.php";
 
       // Connect to MySQL DBMS
       if (!($connection = @ mysql_connect(DB_HOSTNAME, DB_USERNAME, DB_PASSWORD)))
         showerror();
 
       // Use the cars database
       if (!mysql_select_db(DB_DATABASENAME, $connection))
         showerror();
 
       // Create SQL statement
       $price = $_POST["price"];
 
       $query = "SELECT * FROM ad_brac WHERE Price='$price'";
 
       // Execute SQL statement
       if (!($result = @ mysql_query ($query, $connection)))
         showerror();
 
// starts counter at 0
       $counter=-1; 
    while ($row = @ mysql_fetch_array($result))
       {

       if($counter == 2){//this will tell us we already have 2 items in the row so start a new row
        echo "</tr>";//close the old row
        $counter=0; //reset the counter as we will now be starting a new row
        echo "<tr>";//start a new row
    }
    
    if ($counter == -1) {
        //this code will only action on the first time through, after that counter will hold values on 0,1,or 2
        $counter=0; //reset the counter to begin
        echo "<tr>";//start the first row of the results
    }

        if($counter < 2){ //if we already have 2 items in the row then we need to start a new row
        

               echo "<td>{$row['StockCode']}</td>
               <td>{$row['Description']}</td>
               <td>{$row['Price']}</td>
               <td><p><a href='{$row['IMGURL']}'><img src='{$row['IMG']}'></img></p></td>
               <td><center>{$row['URL']}</center></td>";

        if ($counter == 1) echo "<td>&nbsp;</td>"; //do this to ensure a nice space between the two coloumn
    
        $counter++; //increment the counter to show we have added one item to the current row
    }
    }//end of while loop
    
    //so now we are out of the while loop, we need to assess how the table ended. how many items are in the last row
    //if there is only one then we need to flesh out the second item in that row is &nbsp; to make it look good
    if ($counter==1){
    echo "    <td>&nbsp;</td>
               <td>&nbsp;</td>
               <td>&nbsp;</td>
               <td>&nbsp;</td>
               <td>&nbsp;</td>";
    }    
        
 
       echo "</td></table>";
       }
     ?>
</body>

</html>

dragon
 

dragon2309

P.I Dragon
meh, i think i got it, you had the counter set to 1, if ti was 1 then echo the gap. I thought about that, and on the first record the counter should be 0. so changed to 0 and now i kinda have a gap, i think i deleted the space in the middle

dragon
 

dragon2309

P.I Dragon
ok, spent a few mins tidying up and condensing a bit, all is nice, got the colours back into it, now its that good ol' shade of pink again, lol. changed the colour od the <td> in the middle. all is looking very nice, oh yeh, changed the query a bit to only select records with stockcount > 0 aswell as Price = price.

the latest and greatest page is located at http://www.simplytrue.co.uk/stocklist/query7.php

one thing is still a big to me, its not crucial so dont worry tooo much about it, its jsut say you select £1.99, there are no records, because they have already been purchased, the stockcount is at 0. is there not a way i can tell the user that there are no records, cos atm it jsut comes up with an empty table, and that doesnt exactly look that good does it....

any ideas on that...??

dragon ... :D
 

apj101

VIP Member
dragon2309 said:
any ideas on that...??

dragon ... :D

sure, i'll give you a few ideas but i think it important that you code them yourself.

You could do one of 2 things.
1. Set up any counter (with value of 0) outside of the loop and increment this counter by one during the loop. That way after the loop is over you can just evalute whether the new counter is greater than 0, if so then you know you have been through the loop at least once and have therefore had some results. If however the value is still 0 then you know you have not had any results so you can echo out the appropriate message
2. Since we set the var counter to = -1 before the loop you could just evaluate whether it is still -1 after the loop (indicating the loop was never entered
3. You could query the sql database with a select count( ... ) from .... and assess the results

pick one ;)
 

dragon2309

P.I Dragon
hey apj, i did number 2, it works cool... i know this is probably taking it way too far, but is there any way to delete or block out the table being printed if there are no records.

I think this would be hard because the table headers bit you see there is in the actual HTMl, nothing to do with the PHP block, again, any IDEAS, you dont have to code them. I wasnt expecting you to start coding the original ones for me, it jsut kinda happned, lol.

I would like to say thankyou now, as you have completed (or aided a whole lot to complete) almost everything that ive come up and had troubles with, you basically just saved me from a few months work, lol.

THANKYOU APJ101

dragon :D
 

dragon2309

P.I Dragon
ok, i have pretty much got that all going now, thanks. i just tested soemthing out, i was sure you could call up records from multiple tables, jsut seperate them with a commoa, but it comes up with errors everywhere.

i thought about a differenct method, this time i made another select option for the table, called it "cat" for category, done that fine, defined it in the query etc... works fine. Only one thing wrong with it...... It doesnt actually echo any of the data, it makes spaces in the table for the correct amount of records, but its all empty nothing is there.

The code is below, the page is http://www.simplytrue.co.uk/stocklist/query8.php

PHP:
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>price Query</title>
</head>

<body>
</head>
 <body>
 
   <h1>price Query</h1>
   
   <form id="make_select" action="<?php $PHP_SELF; ?>" method="post">
   <p>
     Select price:
     <select name="price">
       <option value="£1.99">£1.99</option>
       <option value="£2.99">£2.99</option>
       <option value="£3.99">£3.99</option>
     </select>
     Select category:
     <select name="cat">
       <option value="ad_brac">Adult bracelets</option>
       <option value="ch_brac">Child Bracelets</option>
       <option value="ad_neck">Adult Necklaces</option>
     </select>
      <input type="submit" />
   </p>
   </form>
   <br>
 
   <?php
     if( ! empty( $_POST["price"] ) )
     {
       echo '<table border="1" bgcolor="#FFD9FF" bordercolor="#FF9DFF" bordercolorlight="#FF9DFF" bordercolordark="#FF9DFF" cellpadding="6" style="border-collapse: collapse; font-family: Tahoma; font-size: 11pt">
     <tr>
       <th><font face="Tahoma">Item Number</font></th>
       <th><font face="Tahoma">Description</font></th>
       <th><font face="Tahoma">Price</font></th>
       <th><font face="Tahoma">Image</font></th>
       <th><font face="Tahoma">Information</font></th>
       <th bgcolor="#FFECFF">&nbsp;</th>
       <th>Item Number</th>
       <th>Description</th>
       <th>Price</th>
       <th>Image</th>
       <th>Information</th>
     </tr>


    </div>



     <tr>
       <td bgcolor="#FFECFF">&nbsp;</td>
       <th bgcolor="#FFECFF">&nbsp;</th>
       <th bgcolor="#FFECFF">&nbsp;</th>
       <th bgcolor="#FFECFF">&nbsp;</th>
       <th bgcolor="#FFECFF">&nbsp;</th>
       <th bgcolor="#FFECFF">&nbsp;</th>
       <th bgcolor="#FFECFF">&nbsp;</th>
       <th bgcolor="#FFECFF">&nbsp;</th>
       <th bgcolor="#FFECFF">&nbsp;</th>
       <th bgcolor="#FFECFF">&nbsp;</th>
       <th bgcolor="#FFECFF">&nbsp;</th>
     </tr>';
 
       require "dbinfo.php";
 
       // Connect to MySQL DBMS
       if (!($connection = @ mysql_connect(DB_HOSTNAME, DB_USERNAME, DB_PASSWORD)))
         showerror();
 
       // Use the cars database
       if (!mysql_select_db(DB_DATABASENAME, $connection))
         showerror();
 
       // Create SQL statement
       $cat = $_POST["cat"];
       $price = $_POST["price"];
       
       $query = "SELECT '$cat' FROM ad_brac WHERE Price='$price' AND StockCount > 0";
 
       // Execute SQL statement
       if (!($result = @ mysql_query ($query, $connection)))
         showerror();
 
// starts counter at 0
       $counter=-1; 
    while ($row = @ mysql_fetch_array($result))
       {

       if($counter == 2){//this will tell us we already have 2 items in the row so start a new row
        echo "</tr>";//close the old row
        $counter=0; //reset the counter as we will now be starting a new row
        echo "<tr>";//start a new row
    }
    
    if ($counter == -1) {
        //this code will only action on the first time through, after that counter will hold values on 0,1,or 2
        $counter=0; //reset the counter to begin
        echo "<tr>";//start the first row of the results
    }

        if($counter < 2){ //if we already have 2 items in the row then we need to start a new row
        

               echo "<td>{$row['StockCode']}</td>
               <td>{$row['Description']}</td>
               <td>{$row['Price']}</td>
               <td><p><a href='{$row['IMGURL']}'><img src='{$row['IMG']}'></img></p></td>
               <td><center>{$row['URL']}</center></td>";

        if ($counter == 0) echo '<td bgcolor="#FFECFF">&nbsp;&nbsp;&nbsp;&nbsp;</td>'; //do this to ensure a nice space between the two coloumn
    
        $counter++; //increment the counter to show we have added one item to the current row
    }
    }//end of while loop
    
    //so now we are out of the while loop, we need to assess how the table ended. how many items are in the last row
    //if there is only one then we need to flesh out the second item in that row is &nbsp; to make it look good
    if ($counter==1){
    echo "    <td>&nbsp;</td>
               <td>&nbsp;</td>
               <td>&nbsp;</td>
               <td>&nbsp;</td>
               <td>&nbsp;</td>";
    }    
        
 
       echo "</td></table>";
       }
       
       if($counter == -1)
        echo "<br><br><font face='Tahoma' style='font-size: 11pt'>We're sorry, simplyTrue currently do not have any items of jewellery in stock that meet your criteria. Please try your search again or use the <a href='http://www.simplytrue.co.uk/customnotes.htm'><b>Custom Jewellery</b></a> link to request a specific item of jewellery.<br><br>Thankyou, simplyTrue.</font>";

     ?>
</body>

</html>

dragon
 

apj101

VIP Member
Your problem here is simple dragon. And like a good teacher I’m going to ensure you figure it out for yourself.

As you said the table is filling with blanks, but note there are multiple number of blanks. That tells us that the data array returned from your query did a job correct and returned a table of items matching your description. But yet the headers of that result table aren’t what you where hoping for.
So lets looks at our query shall we
$query = "SELECT '$cat' FROM ad_brac WHERE Price='$price' AND StockCount > 0";
hmmm, ask your self (draw a mently image)... "what will this result table look like", how many tuples will it have? How many columns?

Also had anyone taught you about database design before, i have pieced together you schema from our chat, it doesn't seem very optimized. It may do the job though since its small :)
 

dragon2309

P.I Dragon
OMG, how many times have i read through the entire PHP document, that query construct is all wrong, lol, how dumb do i look now.

That should have been:

$query = "SELECT * FROM $cat WHERE Price='$price' AND StockCount > 0";

OMG, i cant believe i did that, lol, it works now, thanks apj, and yeh, i understand how that wouldnt work, because it was atempting to return the fields named whatever was in $cat, whic was none, lol. Aaarrrggghhh, god damn, that was soo simple and i knew it was wrong as soon as you put it there infront of me, lol

Thanks again, dragon
 

apj101

VIP Member
dont beat your self up about it, the worst bugs are often the simplest fixes, thats what make them so hard to find, there are just a few tricks to help narrow down your hunt which you will pick up. Using checkpoint throughout your code can help in php these can be a simple as a message box half way saying "hello you have reached this line". In more dedicated compilers you can use checkpoint features built into the compiler
 
Top