Desi India Tamil Sex Forum » Feedback & Support » Help, Suggestion, Trash Can » Help » TechnicaL Help » php help

php help

Reply
 
  #1 (permalink)  
Old 04-12-2007, 01:38 PM
riddhi riddhi is offline
(×´¯`·Ð.€.$. i Gu®u·´¯`×)
 
Join Date: Apr 2007
Posts: 467
Thanks: 1
Thanked 37 Times in 28 Posts
Rep Power: 9
Reputation Point: 302

riddhi is a jewel in the roughriddhi is a jewel in the roughriddhi is a jewel in the roughriddhi is a jewel in the rough
Default php help

I got a bit stuck up. Actually I in the table want to display only those
product information that is below the price range.I am taking input the price
after validation trying to use the following loop. It is giving error
like undefined index pd_price,etc.

Here is the code:-


<?
extract($_POST); // Extracts POST Gobal Array
global $total,$price;

if(isset($submit)){
err_after_submission();// Checks errors After submission

if(ereg("[0-9]",$category)){
// Checks Numeric Entry by user

$res=dbQuery("SELECT B.PD_THUMBNAIL,B.PD_NAME,
B.PD_DESCRIPTION,B.PD_QTY,B.PD_PRICE
FROM TBL_CATEGORY A, TBL_PRODUCT B
WHERE A.cat_Parent_ID=$category
AND A.CAT_ID=B.CAT_ID
ORDER BY B.PD_PRICE");

echo "<table cellpadding='5', border='5',cellspacing='10'

align='center'>
<br> <b> <center> Search Result </center></b>

<br><b><center> Product Details </center> </b>";
echo "<br><tr> <td> Preview </td> <td> Name </td>";

echo "<td> Description </td> <td> Quantity </td>";
echo "<td>Price</td>";

$price=$cost; //Backup data
$total=0; // Contains Total Cost of the Product

while ($record=mysql_fetch_array($res)){
echo "<tr>";

if($record['pd_price'] < $price)
{// Display the Product if within the Price Range
$total=$total + $record['pd_price'];
$price=$price - $record['pd_price'];

if($record["pd_thumbnail"]){
$cat_image=$record["pd_thumbnail"];

if($cat_image){
$cat_image = WEB_ROOT.
'images/product/' .$cat_image;
}
else{ // Image of the product not found
$cat_image = WEB_ROOT.
'images/no-image-small.png';
}

echo " <td width='75' align='center'>
<img src='$cat_image'>";

}// End of Cost IF

else {
echo "<b>";
echo "<td>$record['PD_NAME']</td>";
echo "<td>$record['PD_DESCRIPTION']</td>";
echo "<td>$record['PD_QTY']</td>";
echo "<td>$record['PD_PRICE']</td>";
echo "</b>";
}// End Else
echo "</tr>";
}// ENDIF
}// End While

echo"</table>";
}// End IF Category
}// End IF Submit


function err_after_submission(){
global $cost,$category;

if(!ereg("[0-9]",$cost)) {
// Prevents alphabet or invalid number Entry
echo "<br> <center> INVALID ENTRY!!!"
." Please Enter a Number... </center>";
}

if( $cost==0 || $cost < 0){
echo "<br> <center> INVALID ENTRY!!!"
." Please Enter a Valid Number... </center>";
}

if(ereg("Select a Category",$category)){
// Not Even a Single Category Selected
echo "<br><center>Please Select a Category</center>";
}
} // End of Error Routine
?>
Reply With Quote
  #2 (permalink)  
Old 04-13-2007, 12:11 PM
badmash007's Avatar
badmash007 badmash007 is offline
DeSi PoRn LoVeR
 
Join Date: Jun 2006
Location: india
Age: 22
Posts: 2,229
Thanks: 768
Thanked 145 Times in 102 Posts
Rep Power: 25
Reputation Point: 3

badmash007 is an unknown quantity at this point
Default Re: php help

i dont know much about php can you ask on this site. there are some experts..

http://vbteam.info
__________________
...Please Do Reply If You Like My Posts..Will Definetly Encourage Me To Post More Good Stuff..
Reply With Quote
  #3 (permalink)  
Old 04-22-2007, 02:19 AM
riddhi riddhi is offline
(×´¯`·Ð.€.$. i Gu®u·´¯`×)
 
Join Date: Apr 2007
Posts: 467
Thanks: 1
Thanked 37 Times in 28 Posts
Rep Power: 9
Reputation Point: 302

riddhi is a jewel in the roughriddhi is a jewel in the roughriddhi is a jewel in the roughriddhi is a jewel in the rough
Default Re: php help

Thanks a lot badmash007 for the help.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


All times are GMT +6.5. The time now is 03:50 AM.

indian sex mobile phones