Solved

OLD PHP search script to newer PHP script

Posted on 2008-10-10
21
352 Views
Last Modified: 2013-12-13
I have OLD PHP search script that works on hosting company in Hong Kong but when I put it up on my php server here the search option does not work.  Someone told me that it is not working because it was written in old php code and needs to be re-written in newer version of php code.
Following is the same of the search code I am talking about and anyone can help me to convert this old code to new code that will be very appreciated.

---------------------------------------------------------------------------------------------------------------------
if ($REQUEST_METHOD == "POST") {
      if($HTTP_POST_VARS[part_number]){$part_number = $HTTP_POST_VARS[part_number];}
      if(is_numeric($HTTP_POST_VARS[page_size])){$req_page_size = $HTTP_POST_VARS[page_size];}
      if($HTTP_POST_VARS[material]){$req_material = $HTTP_POST_VARS[material];}
      if($HTTP_POST_VARS[type]){$req_type = $HTTP_POST_VARS[type];}
      //   if(is_numeric($HTTP_POST_VARS[width])){$req_width = $HTTP_POST_VARS[width];}
      if($HTTP_POST_VARS[width]){$req_width = $HTTP_POST_VARS[width];}
      if(is_numeric($HTTP_POST_VARS[dinner])){$req_dinner = $HTTP_POST_VARS[dinner];}
      if(is_numeric($HTTP_POST_VARS[doutter])){$req_doutter = $HTTP_POST_VARS[doutter];}
      if($HTTP_POST_VARS[cid]){$req_cid = $HTTP_POST_VARS[cid];}
      if($HTTP_POST_VARS[hidden_search_id]){$req_hidden_search_id = $HTTP_POST_VARS[hidden_search_id];}
      if($HTTP_POST_VARS[hidden_type_id]){$req_hidden_type_id = $HTTP_POST_VARS[hidden_type_id];}
}else{
      if($HTTP_GET_VARS[cid]){$req_cid = $HTTP_GET_VARS[cid];}
      if($HTTP_GET_VARS[type]){$req_type = $HTTP_GET_VARS[type];}
      if($HTTP_GET_VARS[material]){$req_material = $HTTP_GET_VARS[material];}
      //if(is_numeric($HTTP_GET_VARS[width])){$req_width = $HTTP_GET_VARS[width];}
      if($HTTP_GET_VARS[width]){$req_width = $HTTP_GET_VARS[width];}
      if(is_numeric($HTTP_GET_VARS[dinner])){$req_dinner = $HTTP_GET_VARS[dinner];}
      if(is_numeric($HTTP_GET_VARS[doutter])){$req_doutter = $HTTP_GET_VARS[doutter];}
      if(is_numeric($HTTP_GET_VARS[page_size])){$req_page_size = $HTTP_GET_VARS[page_size];}
}
-----------------------------------------------------------------------------------------------------------------------------
0
Comment
Question by:mindtechuser
  • 9
  • 8
  • 4
21 Comments
 
LVL 39

Expert Comment

by:Roger Baklund
Comment Utility
Try this:
if ($REQUEST_METHOD == "POST") {

      if($_POST['part_number']){$part_number = $_POST['part_number'];}

      if(is_numeric($_POST['page_size'])){$req_page_size = $_POST['page_size'];}

      if($_POST['material']){$req_material = $_POST['material'];}

      if($_POST['type']){$req_type = $_POST['type'];}

      //   if(is_numeric($_POST['width'])){$req_width = $_POST['width'];}

      if($_POST['width']){$req_width = $_POST['width'];}

      if(is_numeric($_POST['dinner'])){$req_dinner = $_POST['dinner'];}

      if(is_numeric($_POST['doutter'])){$req_doutter = $_POST['doutter'];}

      if($_POST['cid']){$req_cid = $_POST['cid'];}

      if($_POST['hidden_search_id']){$req_hidden_search_id = $_POST['hidden_search_id'];}

      if($_POST['hidden_type_id']){$req_hidden_type_id = $_POST['hidden_type_id'];}

}else{

      if($_GET['cid']){$req_cid = $_GET['cid'];}

      if($_GET['type']){$req_type = $_GET['type'];}

      if($_GET['material']){$req_material = $_GET['material'];}

      //if(is_numeric($_GET['width'])){$req_width = $_GET['width'];}

      if($_GET['width']){$req_width = $_GET['width'];}

      if(is_numeric($_GET['dinner'])){$req_dinner = $_GET['dinner'];}

      if(is_numeric($_GET['doutter'])){$req_doutter = $_GET['doutter'];}

      if(is_numeric($_GET['page_size'])){$req_page_size = $_GET['page_size'];}

}

Open in new window

0
 

Author Comment

by:mindtechuser
Comment Utility
Thanks for the code. However it did not work  when I search it took right back to original page not the value I picked to search.  Again it works find on the hosting company in Hong Kong except we do not want to keep it in there anymore.  if I use like $req_material = "VITON"; this value before "if" then it search for the value of VITON just fine.  But when I try to really use the search function then it does not do any.  You think there will be any hope for fixing it?  
0
 
LVL 108

Expert Comment

by:Ray Paseur
Comment Utility
HTTP_POST_VARS and HTTP_GET_VARS are deprecated, and apparently omitted from your current build of PHP.  You might want to scan the code and replace all instances of HTTP_POST_VARS with _POST, likewise for HTTP_GET_VARS and _GET.

Other deprecated things include magic quotes and register globals, to name two.

Good luck, ~Ray
0
 
LVL 39

Expert Comment

by:Roger Baklund
Comment Utility
Hard to tell. Check if there are more references to $HTTP_*_VARS other places in the code, and change them to $_GET/$_POST. Also check web server logs for errors, it could give you a hint about the problem.
0
 

Author Comment

by:mindtechuser
Comment Utility
Let me be clear again.

So what you are saying is change anything with "HTTP_POST_VARS" to "_POST",  and "HTTP_GET_VARS' to "_GET".

That is what you saying right?
0
 

Author Comment

by:mindtechuser
Comment Utility
I just try that as well but result is the same it is not doing anything.
I am going to try to find any associated code using "HTTP_   _VARS"  and replace them see if that will do the trick.  Since I am in really new at this PHP stuff I don't even know what is old code or new code.

Thank you for your help.
0
 
LVL 39

Expert Comment

by:Roger Baklund
Comment Utility
In PHP all variables start with a $ character. Some variables are pre-defined by PHP, like $HTTP_POST_VARS and $HTTP_GET_VARS, used for getting HTTP POST variables and URL parameters, respectively. These are however replaced by $_POST and $_GET in newer versions of PHP. Many PHP installations support both variants, but some new versions (like yours, probably) does not support the old $HTTP_*_VARS, only the new $_POST and $_GET.

More information:

http://se.php.net/manual/en/reserved.variables.php
http://se.php.net/manual/en/language.variables.predefined.php
0
 
LVL 108

Expert Comment

by:Ray Paseur
Comment Utility
Set error reporting as shown below.  

If you are not getting a parse error, the reason for "it did not work when I search" is either data dependent or a logic error elsewhere in the code.  You might want to run phpinfo() and post the output here, or post a link to your phpinfo() script so we can see what your config looks like.

HTH, ~Ray
<?php 

error_reporting(E_ALL);

Open in new window

0
 

Author Comment

by:mindtechuser
Comment Utility
Following is the actual search.php & function.inc.php file /

I think that's all of the important file that are related to this search function.

I am pretty stuck at this point.  

Any help will be appreciated.
search.php

-------------------------------------------------
 
 

<?php require("inc/session_start.inc.php"); ?>

<?php
 

// if we got a wrong number of page -> set page=1

$req_page_num  = $_GET[p];

if(is_numeric($req_page_num)){

	if($req_page_num > 0) $page_current = $req_page_num;

	else $page_current = 1;

}else{

	$page_current = 1;

}
 

?>
 

<?php require("inc/definitions.inc.php"); ?>

<?php require("inc/functions.inc.php"); ?>

<?php
 
 

// connecting to data base

getDBInfo();

setDBConnect();
 

$req_page_size = "100";

$req_material = "";

$req_type = "";

$req_width = "";

$req_dinner = "";

$req_doutter = "";

$req_cid = "1";

$req_hidden_search_id = "0";

$req_hidden_type_id = "0";
 

// procced form submition

if ($REQUEST_METHOD == "POST") {

	if($_POST[part_number]){$part_number = $_POST[part_number];}

	if(is_numeric($_POST[page_size])){$req_page_size = $_POST[page_size];}

	if($_POST[material]){$req_material = $_POST[material];}

	if($_POST[type]){$req_type = $_POST[type];}

	//   if(is_numeric($_POST[width])){$req_width = $_POST[width];}

	if($_POST[width]){$req_width = $_POST[width];}

	if(is_numeric($_POST[dinner])){$req_dinner = $_POST[dinner];}

	if(is_numeric($_POST[doutter])){$req_doutter = $_POST[doutter];}

	if($_POST[cid]){$req_cid = $_POST[cid];}

	if($_POST[hidden_search_id]){$req_hidden_search_id = $_POST[hidden_search_id];}

	if($_POST[hidden_type_id]){$req_hidden_type_id = $_POST[hidden_type_id];}

}else{

	if($_GET[cid]){$req_cid = $_GET[cid];}

	if($_GET[type]){$req_type = $_GET[type];}

	if($_GET[material]){$req_material = $_GET[material];}

	//if(is_numeric($_GET[width])){$req_width = $_GET[width];}

	if($_GET[width]){$req_width = $_GET[width];}

	if(is_numeric($_GET[dinner])){$req_dinner = $_GET[dinner];}

	if(is_numeric($_GET[doutter])){$req_doutter = $_GET[doutter];}

	if(is_numeric($_GET[page_size])){$req_page_size = $_GET[page_size];}

}

//echo $_POST[cid]  . " ".  $_POST[type];

?>
 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="content-type" content="text/html;charset=iso-8859-1">

<meta name="keywords"

	content="seals, seal, o rings, gaskets, o ring, metric, hydraulic, viton, shaft, u cups, oil, pump, mechanical sealing, rotary, packings, rings, chesterton, federal-mogul, neoprene, polypak, American, pipe, pump, valve packing, parker, high, mechanical, large, hercules, rotating, rotary, marine, u-cup, merkel, stern, rudder, performance, sealing, devices, custom, special, gaskets, seals, sealing, devices, fluid, shaft, rotary, pipe, Seals, Gaskets, Metric, Oil, Hydraulic, Special, Packings, Custom, Cylinder, Shaft, Seals Gaskets Metric Seals Oil Seals Pump Seals Packings O-Rings FREE CATALOG Non-Asbestos Gasket Material Sheet Material Industrial seals sealing devices gaskets mechanical packings metric seals hydraulic seals oil seals spiral wound gaskets rubber o-rings pump seals and shaft seals polyurethane viton, teflon nitrile buna-n silicone non-asbestos sponge leather Gylon Bluegard Fabric and Rubber Goretex U-cups wipers v-rings polypacks ram packings back-up rings scrapers piston seals rod seals Seals Gaskets Oil seals Pump seals Mechanical shaft seals O-rings Rubber Seal kits Metric seals Hydraulic seals Sealing devices Spiral wound gaskets Cross references to Seal-Jet Economos Garlock Merkel James Walker Durametallic John Crane Chesterton Sepco Klinger Hallite RM JM Fruedenberg-NOK CR National Parker Pradifa Eriks Viton Kalrez Chemraz AllChem Green Tweed">

<meta name="description"

	content="Perhaps one of the largest selections of seals on the entire internet, gro&szlig;e Auswahl der hydraulischen Dichtungen, selecci&oacute;n grande hidr&aacute;ulicos de sellos">

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<meta http-equiv="Expires" content="0">

<meta http-equiv="Pragma" content="no-cache">

<meta http-equiv="cache-control" content="private">

<meta http-equiv="cache-control" content="no-cache">

<title>Harwal Search Products</title>

<link rel="stylesheet" type="text/css" href="css/standard.css" />
 

<script src='js/topmenu.js'></script>

<script type="text/JavaScript" src="js/functions.inc.js"></script>

<script type="text/JavaScript">

   <!--

   

   function submitNewCid(){

      frmSeals.type.value = "";

      frmSeals.material.value = "";

      frmSeals.dinner.value = "";

      frmSeals.doutter.value = "";

      frmSeals.width.value = "";

      document.frmSeals.submit();

      return true ;

   }

   

   function submitIt(){

      if (!isNumeric(document.frmSeals.dinner.value,3) && (frmSeals.cid.value != "11")){ //endcaps

           alert("The inner diameter must be a numeric value!\nPlease, reenter.");

           document.frmSeals.dinner.focus();

           document.frmSeals.dinner.select();

           return false;

      }

      if (!isNumeric(document.frmSeals.doutter.value,3) && (frmSeals.cid.value != "7")){ //vrings

           alert("The outter diameter must be a numeric value!\nPlease, reenter.");

           document.frmSeals.doutter.focus();

           document.frmSeals.doutter.select();

           return false;

      }

      document.frmSeals.submit();

      return true ;

   }

   

   function checkForm2(){

     if (document.frmSeals2.part_number.value == ""){

         alert("Enter a part number please!");

         return false;

     }

     return true; 

   }

   //-->

   </script>

</head>
 

<body marginwidth="0" marginheight="0" leftmargin="0" topmargin="0">

<? require_once "inc/top_frame.php"; ?>
 

<div align="center">

<table width="780" border="0" cellpadding="0" cellspacing="0">

	<tr>

		<td colspan="3" align="center"><br>

		

		

		<a href="parts_competitor.php"><b>Competitor part number interchange</b></a><br>

		

		</td>

	</tr>

	<tr>

		<td width="10" valign="top"></td>

		<td width="90%" valign="top" align="center">
 

		<table width="450" border="0" align="center" cellpadding="0"

			cellspacing="0">

			<tr>

				<td><br>

				

				</td>

			</tr>

			<tr>

				<td align="center">

				<form name="frmSeals" action="part_search.php" method="POST"><input

					type="hidden" name="hidden_search_id"

					value="<?php echo $req_hidden_search_id; ?>"> <input type="hidden"

					name="hidden_type_id" value="<?php echo $req_hidden_type_id; ?>">

				<fieldset style="padding: 5px"><legend>Search</legend>

				<table cellspacing="2" cellpadding="2" border=0 align="center">

					<tr>

						<td colspan=5></td>

					</tr>

					<tr>

						<td align="left" valign="top" style="font-size: 10pt"><b>For:<br>

						

						</b><?php fillSelectCategory($req_cid); ?></td>

						<td>&nbsp;</td>

						<td align="left" valign="top" style="font-size: 10pt"><b>Type:<br>

						

						</b><?php fillSelectType($req_cid, $req_type); ?></td>

						<td>&nbsp;</td>

						<td align="left" valign="top" style="font-size: 10pt"><b>Material:<br>

						

						</b><?php fillSelectMaterial($req_cid, $req_material); ?></td>

					</tr>

					<tr>

					<?php

					if($req_cid == "11"){

						echo "<td>&nbsp;</td><td align='left' valign='top' style='display: none; font-size: 10pt'><b>Inner Diameter:</b><br><input style='width:140px;' name='dinner' size='12' value='" .$req_dinner. "'></td>";

					}else if($req_cid == "7"){

						echo "<td align='left' valign='top' style='font-size: 10pt'><b>Shaft Size:</b><br><input style='width:140px;' name='dinner' size='12' value='" .$req_dinner. "'></td>";

					}else {

						echo "<td align='left' valign='top' style='font-size: 10pt'><b>Inner Diameter:</b><br><input style='width:140px;' name='dinner' size='12' value='" .$req_dinner. "'></td>";

					}

					?>

						<td>&nbsp;</td>

						<?php

				  if($req_cid == "7")

				  echo "<td>&nbsp;</td><td align='left' valign='top' style='display: none; font-size: 10pt'><b>Outer Diameter:</b><br><input style='width:124px;' name='doutter' size='12' value='" .$req_doutter. "'></td>";

				  else

				  echo "<td align='left' valign='top' style='font-size: 10pt'><b>Outer Diameter:</b><br><input style='width:124px;' name='doutter' size='12' value='" .$req_doutter. "'></td>";

				  ?>

						<td>&nbsp;</td>

						<?php

				  if($req_cid == "7")

				  echo "<td>&nbsp;</td><td align='left' valign='top' style='display: none; font-size: 10pt'><b>Width:</b><br><input style='width:124px;' name='width' size='15'  value='" .$req_width. "'></td>";

				  else

				  echo "<td align='left' valign='top' style='font-size: 10pt'><b>Width:</b><br><input style='width:124px;' name='width' size='15'  value='" .$req_width. "'></td>";

				  ?>
 

					</tr>

					<tr>

						<td colspan=5>&nbsp;</td>

					</tr>

					<tr>

						<td colspan=5 align="center" valign="center"

							style="font-size: 10pt"><b>Rows:</b>&nbsp;&nbsp;<?php fillSelectPageSize($req_page_size); ?>&nbsp;&nbsp;<input

							name="butt_submit" type=button onClick="return submitIt();"

							value="Search"></td>

					</tr>

				</table>

				</fieldset>

				<br>
 
 

				<?php
 

				list($s_dinner, $s_douter, $s_width) = split('[ ]', trim($part_number));
 

				//echo $cid;

				if($cid == "13"){

					$group_by = "GROUP BY Part_Number, Type ";   //, , , Material

				}else if($cid == "7"){

					$group_by = "GROUP BY Part_Number, Type, DInner, Material ";   //, , , Material

				}else if($cid == "11"){

					$group_by = "GROUP BY Part_Number, Type, DOutter, Width, Material ";   //, ,, Material

				}else{

					$group_by = "GROUP BY Part_Number, Type, DInner, DOutter, Width, Material ";   //, ,, Material

				}

				$where = "WHERE ";

					

				//echo "=======".$_POST[butt_submit2];

				if (($_POST[butt_submit2]) === "Search") {

					#$SQL = "SELECT COUNT(*), cid FROM productsTBL GROUP BY Part_Number  HAVING cid > 0 ";

					#if($s_dinner) $SQL .= " AND DInner = '".RemoveZeros($s_dinner)."' ";

					#if($s_douter) $SQL .= " AND DOutter = '".RemoveZeros($s_douter)."' ";

					#if($s_width) $SQL .= " AND Width = '".RemoveZeros($s_width)."' ";

					$SQL = "SELECT productsTBL.* FROM productsTBL ".$where." cid > 0 ";

					if($s_dinner) $SQL .= " AND DInner = '".RemoveZeros($s_dinner)."' ";

					if($s_douter) $SQL .= " AND DOutter = '".RemoveZeros($s_douter)."' ";

					if($s_width) $SQL .= " AND Width = '".RemoveZeros($s_width)."' ";

					//$SQL .= " AND Part_Number LIKE '$s_dinner%$s_douter%$s_width%'";

					$SQL .= " ".$group_by." ";

					$SQL .= " ORDER BY Part_Number, DInner, DOutter ;";
 

					//echo " <br>=== $s_dinner $s_douter $s_width ";

				}else{

					#$SQL = "SELECT COUNT(*), cid FROM productsTBL GROUP BY Part_Number  HAVING cid=" .$req_cid. " ";

					#if($req_material != "") {$SQL = $SQL . "AND Material='" . $req_material . "' ";}

					#if($req_type != "") {$SQL = $SQL . "AND Type='" . $req_type . "' ";}

					#if(($req_cid != "7") && ($req_width != "")) {$SQL = $SQL . "AND Width='" . trim($req_width) . "' ";}

					#if(($req_cid != "11") && ($req_dinner != "")) {$SQL = $SQL . "AND DInner='" . trim($req_dinner) . "' ";}

					#if(($req_cid != "7") && ($req_doutter != "")) {$SQL = $SQL . "AND DOutter='" . trim($req_doutter) . "' ";}

					#$SQL = $SQL . " ORDER BY Part_Number ;";

					//if($cid == "13"){

					$SQL = "SELECT productsTBL.*, SUM(Quantity) as total_quantity FROM productsTBL ".$where." cid=" .$req_cid. " ";

					//}else{

					//$SQL = "SELECT productsTBL.* FROM productsTBL ".$where." cid=" .$req_cid. " ".$group_by." ";

					//}

					if($req_material != "") {$SQL = $SQL . "AND Material='" . $req_material . "' ";}

					if($req_type != "") {$SQL = $SQL . "AND Type='" . $req_type . "' ";}

					if(($req_cid != "7") && ($req_width != "")) {$SQL = $SQL . "AND Width = '" . AddRemoveZeros(trim($req_width)) . "' ";}

					if(($req_cid != "11") && ($req_dinner != "")) {$SQL = $SQL . "AND DInner='" . AddRemoveZeros(trim($req_dinner)) . "' ";}

					if(($req_cid != "7") && ($req_doutter != "")) {$SQL = $SQL . "AND DOutter='" . AddRemoveZeros(trim($req_doutter)) . "' ";}

					$SQL .= " ".$group_by." ";

					$SQL .= " ORDER BY Part_Number, DInner, DOutter ;";

				}
 

				$resMSeals_p = mysql_query($SQL);

				//echo mysql_error();

				//  echo $SQL."<br><br> ";

				//echo "<br>".mysql_affected_rows()."__";
 

				// set pages_total & page_current vars for paging

				if((mysql_affected_rows() > 0) && ($srow=mysql_fetch_row($resMSeals_p))){

					if(is_float($srow[0] / $req_page_size))

					$pages_total = intval((mysql_affected_rows() / $req_page_size) + 1);

					else

					$pages_total = intval(mysql_affected_rows() / $req_page_size);

				}else{

					$pages_total = 0;

				}

				if($page_current > $pages_total) $page_current = $pages_total;
 

				if (($_POST[butt_submit2]) === "Search") {

					$SQL = "SELECT productsTBL.* FROM productsTBL ".$where." cid > 0 ";

					if($s_dinner) $SQL .= " AND DInner = '".RemoveZeros($s_dinner)."' ";

					if($s_douter) $SQL .= " AND DOutter = '".RemoveZeros($s_douter)."' ";

					if($s_width) $SQL .= " AND Width = '".RemoveZeros($s_width)."' ";

					//$SQL .= " AND Part_Number LIKE '$s_dinner%$s_douter%$s_width%'";

					$SQL .= " ".$group_by." ";

					$SQL .= " ORDER BY Part_Number, DInner, DOutter ;";

				}else{

					//if($cid == "13"){

					$SQL = "SELECT productsTBL.*, SUM(Quantity) as total_quantity FROM productsTBL ".$where." cid=" .$req_cid. " ";

					//}else{

					//    $SQL = "SELECT productsTBL.* FROM productsTBL ".$where." cid=" .$req_cid. " ".$group_by." ";

					//}

					if($req_material != "") {$SQL = $SQL . "AND Material='" . $req_material . "' ";}

					if($req_type != "") {$SQL = $SQL . "AND Type='" . $req_type . "' ";}

					if(($req_cid != "7") && ($req_width != "")) {$SQL = $SQL . "AND Width = '" . AddRemoveZeros(trim($req_width)) . "' ";}

					if(($req_cid != "11") && ($req_dinner != "")) {$SQL = $SQL . "AND DInner='" . AddRemoveZeros(trim($req_dinner)) . "' ";}

					if(($req_cid != "7") && ($req_doutter != "")) {$SQL = $SQL . "AND DOutter='" . AddRemoveZeros(trim($req_doutter)) . "' ";}

					$SQL .= " ".$group_by." ";

					$SQL = $SQL . " ORDER BY Part_Number, DInner, DOutter ;";

				}
 
 

				//echo $SQL."<br><br> ";

				//echo "<br>".$SQL;

				$resMSeals = mysql_query($SQL);

				//echo mysql_error();

				//echo mysql_affected_rows();
 

				echo "<table width='100%' class='query' align=center valign=top border=0>";

				echo "<tr><td align=right valign=center nowrap>&nbsp;<b><a href='basket.php?act=view'>View Current Order</a></b>&nbsp;</td></tr>";

				echo "<tr><td nowrap height='10px'></td></tr>";

				echo "</table>";
 

				echo "<table width='460' class='query' align=center valign=top border=1>";

				echo "<tr bgcolor='#D5D5D5'>";

				echo "<td align=center valign=center><b>Part Number</b></td>";

				if($_SESSION['logged'] == "true"){

					echo "<td align=center valign=center nowrap>&nbsp;&nbsp;</td>";

				}

				if($req_cid != "11"){

					if ($req_cid == "7"){

						echo "<td align=center valign=center>&nbsp;<b>Shaft Size</b>&nbsp;</td>";

					}else{

						echo "<td align=center valign=center>&nbsp;<b>I.D.</b>&nbsp;</td>";

					}

				}

				if($req_cid != "7") echo "<td align=center valign=center>&nbsp;<b>O.D.</b>&nbsp;</td>";

				if($req_cid != "7") echo "<td align=center valign=center>&nbsp;<b>Width</b>&nbsp;</td>";

				echo "<td align=center valign=center>&nbsp;<b>Type</b>&nbsp;</td>";

				echo "<td align=center valign=center>&nbsp;<b>Material</b>&nbsp;</td>";

				//if($req_cid == "13"){

				echo "<td align=center valign=center>&nbsp;<b>Warehouse</b>&nbsp;</td>";

				//}

				if($req_cid != "6") echo "<td align=center valign=center><b>Description</b></td>";

				echo "<td align=center valign=center style='padding-left:3px;padding-right:3px;'><b>Stock</b></td>";

				echo "</tr>";
 

				// run until current start row

				$ind = 0;

				while (($ind < (($page_current-1)*$req_page_size)) && ($msrow=mysql_fetch_array($resMSeals))){

					$ind = $ind + 1;

				}
 

				$ind = 0;

				while ((mysql_affected_rows() > 0) && ($msrow=mysql_fetch_array($resMSeals)) && ($ind < $req_page_size))

				{

					if($msrow['Part_Number'] != ""){

						if($ind % 2 == 1) echo "<tr bgcolor='#D5D5D5'>";

						else echo "<tr>";
 

						echo "<td nowrap align=left valign=top>&nbsp;<font size=2><a href='product.php?pid=" . $msrow['pid'] . "&p=".$page_current."&page_size=".$req_page_size."' style='text-decoration: none; '>" . $msrow['Part_Number'] . "</a>&nbsp;</font></td>";

						if($_SESSION['logged'] == "true"){

							echo "<td align=center valign=center nowrap>&nbsp;<input type='button' onclick=\"document.location.href='basket.php?act=add&pid=". $msrow['pid'] ."'\" style='font-size: 11px; width:75px;' value='Add to Cart'>&nbsp;</td>";

						}

							

						if($req_cid != "11") echo "<td nowrap align=right valign=top>&nbsp;<font size=2>" . MyAddRemoveZeros($msrow['DInner'], $req_cid) . "</font>&nbsp;</td>";

						if($req_cid != "7")  echo "<td nowrap align=right valign=top>&nbsp;<font size=2>" . MyAddRemoveZeros($msrow['DOutter'], $req_cid) . "</font>&nbsp;</td>";

						if($req_cid != "7")  echo "<td nowrap align=right valign=top>&nbsp;<font size=2>" . MyAddRemoveZeros($msrow['Width'], $req_cid) . "</font>&nbsp;</td>";

						echo "<td nowrap align=right valign=top>&nbsp;<font size=2>" . $msrow['Type'] . "</font>&nbsp;</td>";

						if(strtolower($msrow['Material']) === "viton")

						echo "<td nowrap align=center valign=top>&nbsp;<font size=2><i>" . $msrow['Material'] . "</i></font>&nbsp;</td>";

						else

						echo "<td nowrap align=center valign=top>&nbsp;<font size=2>" . $msrow['Material'] . "</font>&nbsp;</td>";

						//if($req_cid == "13"){

						echo "<td nowrap align=center valign=top>&nbsp;<font size=2></font>CO, VT&nbsp;</td>";

						//}

						if($req_cid != "6") echo "<td nowrap align=center valign=top>&nbsp;<font size=2>" . $msrow['Description'] . "</font>&nbsp;</td>";

						//if($req_cid == "13"){

						echo "<td nowrap align=center valign=top>&nbsp;<font size=2>" . $msrow['total_quantity'] . "</font>&nbsp;</td>";

						//}else{

						//   echo "<td nowrap align=center valign=top>&nbsp;<font size=2>" . $msrow['Quantity'] . "</font>&nbsp;</td>";

						//}

							

						echo "</tr>";

						$ind = $ind + 1;

					}

				}

				if($ind == 0){

					if($_SESSION['logged'] == "true"){ $colspan="8"; }else{ $colspan="7"; };

					echo "<tr><td align=center valign=center colspan='" .$colspan. "'><br>No match found<br>Please call for availability (802)223-0197<br>&nbsp;</td></tr>";

				}

				echo "</table>";

				echo "<br>";

				$ind = 0;

				echo "<center>";
 

				// display paging line

				if($pages_total > 1){

					$href_string = "&cid=". $req_cid ."&type=".$req_type."&material=".$req_material."&width=".$req_width."&dinner=".$req_dinner."&doutter=".$req_doutter."&page_size=".$req_page_size;

					echo "<center>&nbsp;Select a page:&nbsp;";

					echo "&nbsp;<a class='page' title='first' href='?p=1". $href_string."'>|<<</a>";

					if($page_current > 1) echo "&nbsp;<a class='page' title='previous' href='?p=" . ($page_current - 1) . $href_string."'><<</a>";

					else echo "&nbsp;<a class='page' title='previous' href='?p=" . $page_current . $href_string."'><<</a>";

					echo "&nbsp;";

					$low_window_ind = $page_current - 3;

					$high_window_ind = $page_current + 3;

					if($low_window_ind > 1){ $start_index = $low_window_ind; echo "..."; }

					else $start_index = 1;

					if($high_window_ind < $pages_total) $end_index = $high_window_ind;

					else $end_index = $pages_total;

					for($ind=$start_index; $ind <= $end_index; $ind++){

						if($ind == $page_current) echo "&nbsp;<a class='page' title='current' href='?p=" . $ind . $href_string."'><b><u>" . $ind . "</u></b></a>";

						else echo "&nbsp;<a class='page' href='?p=" . $ind . $href_string."'>" . $ind . "</a>";

						if($ind < $pages_total) echo ",&nbsp;";

						else echo "&nbsp;";

					}

					if($high_window_ind < $pages_total) echo "...";

					if($page_current < $pages_total) echo "&nbsp;<a class='page' title='next' href='?p=" . ($page_current + 1) . $href_string."'>>></a>";

					else echo "&nbsp;<a class='page' title='next' href='?p=" . $page_current . $href_string."'>>></a>";

					echo "&nbsp;<a class='page' title='last' href='?p=" . $pages_total . $href_string."'>>>|</a>";

				}else{

					// empty

				}

					
 

				echo "</center><br><br>";

				?></form>

				</td>

			</tr>

		</table>
 

		</td>

		<td width="10" valign="top">&nbsp;</td>

	</tr>

	<tr>

		<td nowrap colspan="2"><? require_once "inc/bottom.php"; ?></td>

	</tr>

</table>

</div>

</body>

</html>

				<?php
 

				$_SESSION['orderSent'] = "false";
 

				function fillSelectCategory($sel_ind){

					echo "<select style='width:146px;' onchange='submitNewCid()' name='cid'>";// onchange='setSearchFields()'

					$SQL = "SELECT * FROM categoriesTBL WHERE showed=1 ORDER BY cid";

					$resCategories = mysql_query($SQL);

					while ($categRow=mysql_fetch_array($resCategories)){

						if($categRow['cid'] == $sel_ind)

						echo "<option value='" .$categRow['cid']. "' selected>" .$categRow['select_name']. "</option>";

						else

						echo "<option value='" .$categRow['cid']. "'>" .$categRow['select_name']. "</option>";

					}

					echo "</select>";

				}
 

				function fillSelectType($sel_ind_cid, $sel_ind_tid){

					echo "<select style='width:130px;' name='type'>";

					echo "<option value=''>&nbsp;Any&nbsp;</option>";

					$SQL = "SELECT * FROM typesTBL WHERE cid=" .$sel_ind_cid. " ORDER BY tid";

					$resTypes = mysql_query($SQL);

					while ($typeRow=mysql_fetch_array($resTypes)){

						if($typeRow['name'] == $sel_ind_tid)

						echo "<option value='" .$typeRow['name']. "' selected>" .$typeRow['name']. "</option>";

						else

						echo "<option value='" .$typeRow['name']. "'>" .$typeRow['name']. "</option>";

					}

					echo "</select>";

				}
 

				function fillSelectMaterial($sel_ind_cid, $sel_ind){

					echo "<select style='width:130px;' name='material'>";

					if($sel_ind_cid == '6'){

						echo "<option value='Polyurethane 90' selected>Polyurethane 90</option>";

					}else{

						if($sel_ind == '') {

							echo "<option value='' selected>&nbsp;Any&nbsp;</option>";

	      echo "<option value='NITRILE'>NITRILE</option>";

	      echo "<option value='VITON'>VITON</option>";

						}else if($sel_ind == 'NITRILE'){

							echo "<option value=''>&nbsp;Any&nbsp;</option>";

	      echo "<option value='NITRILE' selected>NITRILE</option>";

	      echo "<option value='VITON'>VITON</option>";

						}else{

	      echo "<option value=''>&nbsp;Any&nbsp;</option>";

	      echo "<option value='NITRILE'>NITRILE</option>";

	      echo "<option value='VITON' selected>VITON</option>";

						}

					}

					echo "</select>";

				}
 

				function fillSelectPageSize($sel_ind){

					echo "<select name='page_size'>";

					$sel_10 = "";$sel_25 = "";$sel_50 = "";$sel_100 = "";$sel_250 = "";

					if($sel_ind == "10")$sel_10 ="selected";

					else if($sel_ind == "25")$sel_25 ="selected";

					else if($sel_ind == "50")$sel_50 ="selected";

					else if($sel_ind == "100")$sel_100 ="selected";

					else if($sel_ind == "250")$sel_250 ="selected";

					echo "<option " .$sel_10. " value='10'>10</option>";

					echo "<option " .$sel_25. " value='25'>25</option>";

					echo "<option " .$sel_50. " value='50'>50</option>";

					echo "<option " .$sel_100. " value='100'>100</option>";

					echo "<option " .$sel_250. " value='250'>250</option>";

					echo "</select>";

				}
 

				function MyAddRemoveZeros($num, $req_cid){

					if(($req_cid == 1) || ($req_cid == 4) || ($req_cid == 6) || ($req_cid == 11)){

						if(is_myfloat($num)){

							return RemoveZeros(number_format($num, 1));

						}else{

							if(intval($num) < 10) return "0".RemoveZeros($num);

							else return $num;

						}

					}elseif($req_cid == 2){

						if(is_myfloat($num)){

							return RemoveZeros(number_format($num, 3));

						}else{

							return RemoveZeros(number_format($num, 3));

						}

					}elseif($req_cid == 7){

						if(intval($num) < 10) return "0".RemoveZeros($num);

						else return RemoveZeros($num);

					}elseif($req_cid == 9){

						if(is_mydrob($num)){

							return RemoveZeros($num);

						}elseif(is_myfloat($num)){

							return RemoveZeros(number_format($num, 1));

						}else{

							if(intval($num) < 10) return "0".RemoveZeros($num);

							else return $num;

						}

					}else{

						return $num;

					}

				}
 

				function AddRemoveZeros($num){

					if((substr($num, 0, 1) == ".") || ((is_numeric(substr($num, 0, 1))) && (substr($num, 1, 1) == ".")))

					$num = floatval($num);

					else

					$num = RemoveZeros($num);

					return $num;

				}
 

				function RemoveZeros($num){

					if(substr($num, 0, 1) === "0")

					$num = substr($num, 1, strlen($num));

					return $num;

				}
 

				function is_myfloat($num){

					return strpos($num, '.');

				}
 

				function is_mydrob($num){

					return strpos($num, '/');

				}
 

				?>

				<?php require("inc/closedb.inc.php"); ?>
 
 
 
 

functions.inc.php

----------------------------------------------------------------------
 

<?php

function getDBInfo()

{

  global $DBHost,$DBUser,$DBPass,$DBName;
 

 // $DBHost = "****:3307";

 // $DBUser = "guest";

 // $DBPass = "****";

 // $DBName = "****";
 
 

  $DBHost = "localhost:3306";

  $DBUser = "****";

  $DBPass = "****";

  $DBName = "****";
 

}
 

function getAdmDBInfo()

{

  global $DBHost,$DBUser,$DBPass,$DBName;
 

//  $DBHost = "****:3307";//localhost

//  $DBUser = "****";

//  $DBPass = "****";

//  $DBName = "****";
 

  $DBHost = "localhost:3306";

  $DBUser = "****";

  $DBPass = "****";

  $DBName = "****";
 

}
 
 

function setDBConnect()

{

  global $DBHost,$DBUser,$DBPass,$DBName,$dbh;

  if(!$dbh = mysql_connect("$DBHost","$DBUser","$DBPass"))

  // if(!$dbh = mysql_connect('localhost:3306','mindtech','mindtech'))

  {

     echo "<h1><font color=\"red\">error!</font></h1>";

  }else{

     if(!mysql_select_db ($DBName)){

	   echo "<h1><font color=\"red\">error !</font></h1>";

	 }

  }

}
 

function exitondenied(){

   echo "<html><body><br><center>You have not permition to acces this page!</center></body><html>";

   exit(0);  

}
 

function exitonerror(){

   echo "<html><body><br><center>Error! Repeat your query in some time or send us e-mail: <a href='mailto:info@harwal.com'>info@harwal.com</a></center></body><html>";

   exit(1);  

}
 

// find propertly field - price by amount

function findPropField($type, $ind){

  global $prices1, $prices2;      

  if($type == 1){

    while (($prices1[0][$ind] == 0) && ($ind > 0)){ $ind--; }

    return $prices1[1][$ind];

  }else{

    while (( $prices2[0][$ind] == 0 ) && ($ind > 0) ){ $ind--; }

    return $prices2[1][$ind];

  }

  unset($prices1);

  unset($prices2);

}
 

function setArrays($Price_Net, $Price_10pc, $Price_25pc, $Price_50pc, $Price_100pc, $Price_250pc, $Price_500pc, $Price_1000pc){

  global $prices1, $prices2;      

  if($Price_Net)    $prices1[0][0]= $Price_Net;    else $prices1[0][0]= 0;  $prices1[1][0]="Price_Net";

  if($Price_10pc)   $prices1[0][1]= $Price_10pc;   else $prices1[0][1]= 0;  $prices1[1][1]="Price_10pc";

  if($Price_25pc)   $prices1[0][2]= $Price_25pc;   else $prices1[0][2]= 0;  $prices1[1][2]="Price_25pc"; 

  if($Price_50pc)   $prices1[0][3]= $Price_50pc;   else $prices1[0][3]= 0;  $prices1[1][3]="Price_50pc";

  if($Price_100pc)  $prices1[0][4]= $Price_100pc;  else $prices1[0][4]= 0;  $prices1[1][4]="Price_100pc";

  if($Price_250pc)  $prices1[0][5]= $Price_250pc;  else $prices1[0][5]= 0;  $prices1[1][5]="Price_250pc";

  if($Price_500pc)  $prices1[0][6]= $Price_500pc;  else $prices1[0][6]= 0;  $prices1[1][6]="Price_500pc";

  if($Price_1000pc) $prices1[0][7]= $Price_1000pc; else $prices1[0][7]= 0;  $prices1[1][7]="Price_1000pc";
 

  if($Price_Net)    $prices2[0][0]= $Price_Net;    else $prices2[0][0]= 0;  $prices2[1][0]="Price_Net";

  if($Price_50pc)   $prices2[0][1]= $Price_50pc;   else $prices2[0][1]= 0;  $prices2[1][1]="Price_50pc";

  if($Price_100pc)  $prices2[0][2]= $Price_100pc;  else $prices2[0][2]= 0;  $prices2[1][2]="Price_100pc";

  if($Price_250pc)  $prices2[0][3]= $Price_250pc;  else $prices2[0][3]= 0;  $prices2[1][3]="Price_250pc";

  if($Price_500pc)  $prices2[0][4]= $Price_500pc;  else $prices2[0][4]= 0;  $prices2[1][4]="Price_500pc";

  if($Price_1000pc) $prices2[0][5]= $Price_1000pc; else $prices2[0][5]= 0;  $prices2[1][5]="Price_1000pc";

}
 

// returns a propertly field name by amount

function priceByAmount($amt, $in_cid, $in_material){

  

 $field_name = "Price_Net";

 if((($in_cid == "1") || ($in_cid == "2") || ($in_cid == "7")) && (strtoupper($in_material) == "VITON")){

    if(($amt >= 1) && ($amt <= 9)){ $field_name = findPropField(1, 0); }

	else if(($amt >= 10) && ($amt <= 24)){ $field_name = findPropField(1, 1); }

	else if(($amt >= 25) && ($amt <= 49)){ $field_name = findPropField(1, 2); }

	else if(($amt >= 50) && ($amt <= 99)){ $field_name = findPropField(1, 3); }

	else if(($amt >= 100) && ($amt <= 249)){ $field_name = findPropField(1, 4); }

	else if(($amt >= 250) && ($amt <= 499)){ $field_name = findPropField(1, 5); }

	else if(($amt >= 500) && ($amt <= 999)){ $field_name = findPropField(1, 6); }

	else if($amt >= 1000){ $field_name = findPropField(1, 7); }

 }else {//if(($in_cid == "4") || ($in_cid == "6") || ($in_cid == "9") || ($in_cid == "11")){

        if(($amt >= 1) && ($amt <= 49)){ $field_name = findPropField(2, 0); }

	else if(($amt >= 50) && ($amt <= 99)){ $field_name = findPropField(2, 1); }

	else if(($amt >= 100) && ($amt <= 249)){ $field_name = findPropField(2, 2); }

	else if(($amt >= 250) && ($amt <= 499)){ $field_name = findPropField(2, 3); }

	else if(($amt >= 500) && ($amt <= 999)){ $field_name = findPropField(2, 4); }

	else if($amt >= 1000){ $field_name = findPropField(2, 5); }

 } 

 return $field_name;

}
 

function DateConvert($old_date, $layout) 

{ 

//Remove non-numeric characters that might exist (e.g. hyphens and colons) 

$old_date = ereg_replace('[^0-9]', '', $old_date); 
 

//Extract the different elements that make up the date and time 

$_year = substr($old_date,0,4); 

$_month = substr($old_date,4,2); 

$_day = substr($old_date,6,2); 

$_hour = substr($old_date,8,2); 

$_minute = substr($old_date,10,2); 

$_second = substr($old_date,12,2); 
 

//Combine the date function with mktime to produce a user-friendly date & time 

$new_date = date($layout, mktime($_hour, $_minute, $_second, $_month, $_day, $_year)); 

return $new_date; 

} 
 

?>

Open in new window

0
 
LVL 108

Expert Comment

by:Ray Paseur
Comment Utility
Start with this change, run again and tell us what error messages you got.
search.php

-------------------------------------------------

 

 

<?php require("inc/session_start.inc.php"); ?>

<?php

 error_reporting(E_ALL);
 

etc..

Open in new window

0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 

Author Comment

by:mindtechuser
Comment Utility
I've all kinds of errors.



Notice: Use of undefined constant p - assumed 'p' in C:\xampplite\htdocs\company\search.php on line 6

Notice: Undefined index: p in C:\xampplite\htdocs\company\search.php on line 6

Notice: Undefined variable: REQUEST_METHOD in C:\xampplite\htdocs\company\search.php on line 36

Notice: Use of undefined constant cid - assumed 'cid' in C:\xampplite\htdocs\company\search.php on line 49

Notice: Undefined index: cid in C:\xampplite\htdocs\company\search.php on line 49

Notice: Use of undefined constant type - assumed 'type' in C:\xampplite\htdocs\company\search.php on line 50

Notice: Undefined index: type in C:\xampplite\htdocs\company\search.php on line 50

Notice: Use of undefined constant material - assumed 'material' in C:\xampplite\htdocs\company\search.php on line 51

Notice: Undefined index: material in C:\xampplite\htdocs\company\search.php on line 51

Notice: Use of undefined constant width - assumed 'width' in C:\xampplite\htdocs\company\search.php on line 53

Notice: Undefined index: width in C:\xampplite\htdocs\company\search.php on line 53

Notice: Use of undefined constant dinner - assumed 'dinner' in C:\xampplite\htdocs\company\search.php on line 54

Notice: Undefined index: dinner in C:\xampplite\htdocs\company\search.php on line 54

Notice: Use of undefined constant doutter - assumed 'doutter' in C:\xampplite\htdocs\company\search.php on line 55

Notice: Undefined index: doutter in C:\xampplite\htdocs\company\search.php on line 55

Notice: Use of undefined constant page_size - assumed 'page_size' in C:\xampplite\htdocs\company\search.php on line 56

Notice: Undefined index: page_size in C:\xampplite\htdocs\company\search.php on line 56

Notice: Undefined variable: part_number in C:\xampplite\htdocs\company\search.php on line 210

Notice: Undefined offset: 2 in C:\xampplite\htdocs\company\search.php on line 210

Notice: Undefined offset: 1 in C:\xampplite\htdocs\company\search.php on line 210

Notice: Undefined variable: cid in C:\xampplite\htdocs\company\search.php on line 213

Notice: Undefined variable: cid in C:\xampplite\htdocs\company\search.php on line 215

Notice: Undefined variable: cid in C:\xampplite\htdocs\company\search.php on line 217

Notice: Use of undefined constant butt_submit2 - assumed 'butt_submit2' in C:\xampplite\htdocs\company\search.php on line 225

Notice: Undefined index: butt_submit2 in C:\xampplite\htdocs\company\search.php on line 225

Notice: Use of undefined constant butt_submit2 - assumed 'butt_submit2' in C:\xampplite\htdocs\company\search.php on line 277

Notice: Undefined index: butt_submit2 in C:\xampplite\htdocs\company\search.php on line 277
0
 
LVL 108

Expert Comment

by:Ray Paseur
Comment Utility
Yes, that happens when development is done without strict coding practices.  The advantage of following the strict rules is that your code is less likely to "break" unexpectedly.

For example, this statement: $req_page_num  = $_GET[p];
 should be written $req_page_num  = $_GET["p"];

"p" is an index into an associative array, whereas p (without the quotes) is a constant.

PHP is very forgiving of these sorts of errors and tries to degrade softly.  That can be both a blessing and a curse, which is why professionals use E_ALL.

Your trouble may be here:
Notice: Undefined variable: REQUEST_METHOD in C:\xampplite\htdocs\company\search.php on line 36

I'm not sure it will help, but you might try changing the variable you test there to
$_ENV["REQUEST_METHOD"]

The reason I say I'm not sure, is that the issues could still be data related.  But that change is worth a try.
0
 

Author Comment

by:mindtechuser
Comment Utility
I am so grateful for your comments and help.
I will for sure to try that and let you know.

THank you,
0
 
LVL 108

Expert Comment

by:Ray Paseur
Comment Utility
Best of luck! ~Ray
0
 
LVL 39

Accepted Solution

by:
Roger Baklund earned 500 total points
Comment Utility
I think it should be $_SERVER['REQUEST_METHOD']
0
 

Author Comment

by:mindtechuser
Comment Utility
Really appreciate both of you I am really glad people like you both are out there.

Thanks.
0
 
LVL 108

Expert Comment

by:Ray Paseur
Comment Utility
@cxr: Congratulations on getting all the points.  FWIW, you can use either $_SERVER or $_ENV to get this variable on most implementations of PHP.  
0
 

Author Comment

by:mindtechuser
Comment Utility
If I know how to split the points I would want to do that and I am sorry I couldn't do that, Ray.  Iif you know how to do that please let me know.  Since I am pretty new at this site I don't know my way around it.

Thanks again both of you and have a wonderful weekend.
0
 
LVL 108

Expert Comment

by:Ray Paseur
Comment Utility
The moderators can help.  This is a quote from the help pages:

How do I close a question?

There are five ways:

Accept an Expert's comment as the solution
    If an Expert has given you the solution to your question, or has led you to the solution, select this option.
Accept multiple solutions
    If several Experts collaborated to provide a solution, use this option and split the points among them.
Accept your own comment as the solution
    If you solved your problem with no assistance from any Expert, post your solution and then click the Accept As Solution button in your own comment.
Accept your own comment, and award points to Experts for their assistance
    If you answered your own question, but wish to award points to Experts for their attempts to help, use this option.
Delete your question
    If you are not getting the kinds of responses that will lead to a solution, you should consider deleting your question and trying again. The Delete Question button is located near the text of your original post.

If you are not certain which selection to make, click the Request Attention button, and the Moderators will help you with the proper choice.

 - and -

I accepted the wrong solution. What do I do?

Click the Request Attention button, and ask the Moderators to change the grade for you.

Best regards, ~Ray
0
 

Author Comment

by:mindtechuser
Comment Utility
Thanks Ray.

I believe I will benefit so much from this site because of people like you.

Thanks.
0
 
LVL 108

Expert Comment

by:Ray Paseur
Comment Utility
Yes, I've found it very helpful.  For the simple things as well as the arcane.  Have a good weekend, ~Ray
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now