<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>PHP Forum RSS Feed</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest threads from the 'PHP' forum at Programmer's Heaven, excluding replies.</description>
    <language>en</language>
    <copyright>Copyright 2008 Programmers Heaven</copyright>
    <pubDate>Mon, 01 Dec 2008 20:30:18 -0700</pubDate>
    <lastBuildDate>Mon, 01 Dec 2008 20:30:18 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>Hear is Image Processing Data-entry Outsourcing services India</title>
      <link>http://www.programmersheaven.com/mb/phpstuff/382288/382288/hear-is-image-processing-data-entry-outsourcing-services-india/</link>
      <description>Hi!!! Thanks for your co-operation.&lt;br /&gt;
&lt;br /&gt;
Now I will like to brief you about my business. &lt;br /&gt;
&lt;br /&gt;
I am the Webmaster of Data-entry Outsourcing services a part of Yantram – BPO Services Pvt. Ltd. Our main business is of Data-entry Outsourcing Administrative Support Services. We also perform other tasks like Image Processing , Photo Indexing,  Image Editing,  Image Cropping, Image Scanning,  Image Stitching,  Digital Photo Enhancement, Image Restoration, Image Retouching ,Filtering, Prioritization, Change detection, 2D and 3D visualization, Automated feature extraction, Automated quality assessment Image Processing Company - Image Editing Studio India, UK, USA, UAE, AUS Etc. Our service charges are quit nominal by fare, which any can afford to have. We have the team of some expert &amp;amp; Data entry team who will fulfill your requirements.&lt;br /&gt;
&lt;br /&gt;
For more information about us visit our website at: &lt;a href="http://data-entry.outsourcing-services-india.com/image-processing.php"&gt;http://data-entry.outsourcing-services-india.com/image-processing.php&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;</description>
      <pubDate>Thu, 27 Nov 2008 05:28:33 -0700</pubDate>
      <category>PHP</category>
    </item>
    <item>
      <title>debug help requested</title>
      <link>http://www.programmersheaven.com/mb/phpstuff/381859/381859/debug-help-requested/</link>
      <description>please help me debug this script:&lt;br /&gt;
&lt;br /&gt;
 &lt;pre class="sourcecode"&gt;*/
function goodreads_block($op='list' , $delta=0, $edit=array())  {
  switch ($op)  {
    case 'list':
      $blocks[0]['info'] = t('Goodreads Bookshelf');
      return $blocks;
    case 'view':
      $url = 'http://www.goodreads.com/review/list_rss/'
            .'398385'
            .'?shelf='
            .'history-of-philosophy';
      $blocks['subject'] = t('On the Bookshelf');
      $blocks['content'] = _goodreads_fetch_bookshelf($url);
      return $blocks;
  }
}

/**
 *
 * Retrieve information from the Goodreads bookshelf XML API.
 * 
 * This makes an HTTP connection to the given URL, and
 * retrieves XML data, which it then attempts to format
 * for display.
 *
 * @param $url
 * URL to the goodreads bookshelf.
 * @return
 * String containing the bookshelf.
 */
function _goodreads_fetch_bookshelf($url, $num_items=3)  {
  $http_result = drupal_http_request($url);

  if ($http_result-&amp;gt;code == 200)  {
    $doc = simplexml_load_string($http_result-&amp;gt;data);
    if ($doc === false)  {
      $msg = "Error parsing bookshelf XML for %url: %msg.";
      $vars = array('%url'=&amp;gt;$url, '%msg'=&amp;gt;$e-&amp;gt;getMessage());
      watchdog('goodreads', '$msg, $vars, WATCHDOG_WARNING);
      return t("Getting the bookshelf resulted in an error.");
    return _goodreads_block_content($doc, $num_items);

   &lt;strong&gt; // Otherwise we don't have any data&lt;/strong&gt;
  }
  else {
    $msg = 'No content from %url.';
    $vars = array('%url' =&amp;gt; $url);
    watchdog('goodreads', $msg, $vars, WATCHDOG_WARNING);
    return t("The bookshelf is not accessible.");
  }
}&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
i get the error: PHP Parse error:  syntax error, unexpected T_STRING in the line i've marked bold</description>
      <pubDate>Fri, 14 Nov 2008 03:27:16 -0700</pubDate>
      <category>PHP</category>
    </item>
    <item>
      <title>Can I Use PHP with Javascript in my HTML scripts?</title>
      <link>http://www.programmersheaven.com/mb/phpstuff/381433/381433/can-i-use-php-with-javascript-in-my-html-scripts/</link>
      <description>&lt;br /&gt;
Hello, &lt;br /&gt;
&lt;br /&gt;
I am new to PHP, but I know this sounds like a dumb question - but I wanted to know if you can use PHP and Javascript in the same HTML script file, as well as CSS, if you keep the languages separated by the tags ? &lt;br /&gt;
&lt;br /&gt;
Second Question, &lt;br /&gt;
&lt;br /&gt;
If I could run PHP and Javascript together - what would be executed first my Javascript or the PHP, because I know that Javascript will execute in the before or in the &amp;lt;body&amp;gt; tags where the function is called, but what about PHP enclosed in &amp;lt;lang&amp;gt; tags , is it executed after or before Javascript? &lt;br /&gt;
&lt;br /&gt;
I could explain further what I want to do with the two languages. I want to use PHP to handle things like mySQL queries or record data in the database, and I want Javascript to handle events like when a mouse is moved over a image to trigger other images to come up in framed window system. &lt;br /&gt;
&lt;br /&gt;
Can this be done? &lt;br /&gt;
&lt;br /&gt;
Thanks &lt;br /&gt;
K.J.Williams</description>
      <pubDate>Thu, 30 Oct 2008 20:31:54 -0700</pubDate>
      <category>PHP</category>
    </item>
    <item>
      <title>DataGrid Class</title>
      <link>http://www.programmersheaven.com/mb/phpstuff/381356/381356/datagrid-class/</link>
      <description>Hi there,&lt;br /&gt;
&lt;br /&gt;
I found a datagrid class script on the internet and it is exactly what I am looking for , the problem is that I can get the script to run. The localhost returns no errors or anything but just displays a page with a whole bunch of characters and things that don't make sense. I'm running PHP 5.2.6 on a wampserver configuration so I'm not too sure if this is perhaps causing a problem. I really need to get this datagrid to work as it will solve a lot of my issues with regards to displaying my data. Please can someone have a look , I would really appreciate it. &lt;br /&gt;
&lt;br /&gt;
Thanking you in advance.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;test.php&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?&lt;br /&gt;
&lt;br /&gt;
include_once("DBinit.php");&lt;br /&gt;
include_once("datagrid.class.php");&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;form name="frmAction" action="" method="POST"&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;h2&amp;gt;Sections&amp;lt;/h2&amp;gt;&lt;br /&gt;
		&lt;br /&gt;
		&lt;br /&gt;
		&amp;lt;span class='normalTxt &amp;lt;?=$color?&amp;gt;'&amp;gt;&amp;lt;?=$t_messg?&amp;gt;&amp;lt;/span&amp;gt;			&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;?&lt;br /&gt;
			//datagrid for existing sections&lt;br /&gt;
			&lt;br /&gt;
			$dbp = new flor_db_process();&lt;br /&gt;
			$query = "select * from patientdemo";&lt;br /&gt;
			$dbp-&amp;gt;fetchQuery($query);&lt;br /&gt;
			$gridData = $dbp-&amp;gt;resultSet;&lt;br /&gt;
			&lt;br /&gt;
			$dg = new DataGrid($gridData);&lt;br /&gt;
			$dg-&amp;gt;width = "300";&lt;br /&gt;
			$dg-&amp;gt;fontSize = .8;&lt;br /&gt;
			$dg-&amp;gt;autoColumns = false;&lt;br /&gt;
	&lt;br /&gt;
			$dg-&amp;gt;paging = true;&lt;br /&gt;
			$dg-&amp;gt;paging_byPageNos = true;&lt;br /&gt;
			$dg-&amp;gt;paging_NoOfRows = 3;&lt;br /&gt;
			&lt;br /&gt;
			&lt;br /&gt;
			$dg-&amp;gt;borderColor = "gray"; //or values like #C0C0C0&lt;br /&gt;
			$dg-&amp;gt;borderStyle = "dotted"; //or solid, or dashed, etc.,&lt;br /&gt;
			$dg-&amp;gt;borderWidth = 1; //integer&lt;br /&gt;
			$dg-&amp;gt;cellPadding = 2; //integer&lt;br /&gt;
			$dg-&amp;gt;headBackgroundColor = "#FFFFCC"; //or values like green&lt;br /&gt;
			$dg-&amp;gt;headForeColor = "green"; //or values like #FFFFFF&lt;br /&gt;
			$dg-&amp;gt;fontSize = .8; //integer&lt;br /&gt;
			$dg-&amp;gt;fontFamily = "courier new"; //or Arial, verdana, etc.,&lt;br /&gt;
			&lt;br /&gt;
			$dg-&amp;gt;colSet[0] = new Column();&lt;br /&gt;
			$dg-&amp;gt;colSet[0]-&amp;gt;displayName = "Headline";&lt;br /&gt;
			$dg-&amp;gt;colSet[0]-&amp;gt;fieldName = "dispName";&lt;br /&gt;
			$dg-&amp;gt;colSet[0]-&amp;gt;width = "70%";			&lt;br /&gt;
			&lt;br /&gt;
			$dg-&amp;gt;colSet[1] = new Column();&lt;br /&gt;
			$dg-&amp;gt;colSet[1]-&amp;gt;displayName = "Code";&lt;br /&gt;
			$dg-&amp;gt;colSet[1]-&amp;gt;fieldName = "positionCode";&lt;br /&gt;
			$dg-&amp;gt;colSet[1]-&amp;gt;width = "30%";&lt;br /&gt;
			&lt;br /&gt;
			 &lt;br /&gt;
			$dg-&amp;gt;showGrid();&lt;br /&gt;
&lt;br /&gt;
		?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;DBinit.php&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?&lt;br /&gt;
&lt;br /&gt;
include_once("flor_db_process.class.php");&lt;br /&gt;
&lt;br /&gt;
define ("DB_DOMAIN","localhost");&lt;br /&gt;
//define ("DB_PORT", 3306);&lt;br /&gt;
define ("DB_USER","root");&lt;br /&gt;
define ("DB_PASS","");&lt;br /&gt;
define ("DB_NAME","patient");&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;DataGrid.class.php&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?&lt;br /&gt;
&lt;br /&gt;
/* -----------------------------------------------&lt;br /&gt;
 * Author: Harish Palaniappan, Floresense.com&lt;br /&gt;
 * Ver: 1.1&lt;br /&gt;
 * Last Updated: Jan 2008&lt;br /&gt;
 * License: LGPL License&lt;br /&gt;
 * You are free to use/modify/redistribute this script. Keep this comment block intact. &lt;br /&gt;
 * ----------------------------------------------&lt;br /&gt;
 *&lt;br /&gt;
 * add your own comments here..&lt;br /&gt;
 * &lt;br /&gt;
 */&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
class DataGrid{&lt;br /&gt;
&lt;br /&gt;
	//vars&lt;br /&gt;
	private $gridHTML = "";&lt;br /&gt;
	public $columnCount = 0;&lt;br /&gt;
	public $rowCount = 0;&lt;br /&gt;
	private $colInfo = null;&lt;br /&gt;
	private $fontStyle = "";&lt;br /&gt;
	&lt;br /&gt;
	private $curRowId = -1;&lt;br /&gt;
	private $curColId = -1;&lt;br /&gt;
&lt;br /&gt;
	//properties&lt;br /&gt;
	public $width = "100%";&lt;br /&gt;
	public $autoColumns = true;&lt;br /&gt;
	&lt;br /&gt;
	public $resultSet = null;&lt;br /&gt;
	public $fontSize = 1;&lt;br /&gt;
	public $fontFamily = "Verdana";&lt;br /&gt;
	&lt;br /&gt;
	public $borderWidth = 1;&lt;br /&gt;
	public $borderStyle = "solid";&lt;br /&gt;
	public $borderColor = "black";&lt;br /&gt;
	public $cellPadding = 2;&lt;br /&gt;
	public $headBackgroundColor = "#5B59B7";&lt;br /&gt;
	public $headForeColor = "#FFFFFF";&lt;br /&gt;
	&lt;br /&gt;
	public $paging_indexAtTop = true;&lt;br /&gt;
	public $paging_indexAtBottom = true;&lt;br /&gt;
	&lt;br /&gt;
	public $pageByName = false;&lt;br /&gt;
	public $pageByName_field = ""; &lt;br /&gt;
	private $curPgAlphaIndex = "";&lt;br /&gt;
	private $pgAlphaIndexKeys = null;&lt;br /&gt;
	&lt;br /&gt;
	public $paging = false;&lt;br /&gt;
	public $paging_byPageNos = false;&lt;br /&gt;
	public $paging_byNextPrev = false;&lt;br /&gt;
	public $paging_NoOfRows = 30; &lt;br /&gt;
	private $curPgIndex = 1;&lt;br /&gt;
	private $totPages = 1;&lt;br /&gt;
	&lt;br /&gt;
	public $colSet = array();&lt;br /&gt;
	public $rowSet = array();&lt;br /&gt;
	public $dataKey = null;&lt;br /&gt;
	&lt;br /&gt;
	&lt;br /&gt;
	//events&lt;br /&gt;
	public $onRowItem_Bound = null;&lt;br /&gt;
			&lt;br /&gt;
	function DataGrid($resultSet=null)&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;resultSet = $resultSet;		&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	function showGrid()&lt;br /&gt;
	{&lt;br /&gt;
		$this-&amp;gt;makeGrid();&lt;br /&gt;
		&lt;br /&gt;
		echo $this-&amp;gt;gridHTML;&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	function makeGrid()&lt;br /&gt;
	{	&lt;br /&gt;
&lt;br /&gt;
		//get params&lt;br /&gt;
		$gridAction = $_POST['flor_grid_a'];&lt;br /&gt;
		$gridVal = $_POST['flor_grid_aV'];&lt;br /&gt;
		if ($gridAction)&lt;br /&gt;
		{&lt;br /&gt;
			$gridAction = strtoupper($gridAction);&lt;br /&gt;
			switch($gridAction)&lt;br /&gt;
			{&lt;br /&gt;
				case "PGA":&lt;br /&gt;
					$this-&amp;gt;curPgAlphaIndex = strtoupper($gridVal);&lt;br /&gt;
					break;&lt;br /&gt;
				&lt;br /&gt;
				case "PG":&lt;br /&gt;
					$this-&amp;gt;curPgIndex = $gridVal;&lt;br /&gt;
					break; 	&lt;br /&gt;
			}&lt;br /&gt;
		}  &lt;br /&gt;
&lt;br /&gt;
		$this-&amp;gt;gridHTML = "";&lt;br /&gt;
		$this-&amp;gt;fontStyle="font-size:".$this-&amp;gt;fontSize."em;font-family:".$this-&amp;gt;fontFamily.";";&lt;br /&gt;
	&lt;br /&gt;
		$this-&amp;gt;initDataInfo();&lt;br /&gt;
		&lt;br /&gt;
		if ($this-&amp;gt;paging_indexAtTop)&lt;br /&gt;
			if ($this-&amp;gt;paging || $this-&amp;gt;pageByName)&lt;br /&gt;
				$this-&amp;gt;gridHTML .= $this-&amp;gt;getPagingHTML();		&lt;br /&gt;
&lt;br /&gt;
		$this-&amp;gt;gridHTML .= $this-&amp;gt;getTableHTML("OPEN");&lt;br /&gt;
		&lt;br /&gt;
		$this-&amp;gt;gridHTML .= $this-&amp;gt;getDataHTML();&lt;br /&gt;
		&lt;br /&gt;
		$this-&amp;gt;gridHTML .= $this-&amp;gt;getTableHTML("CLOSE");&lt;br /&gt;
		&lt;br /&gt;
		if ($this-&amp;gt;paging_indexAtBottom)&lt;br /&gt;
			if ($this-&amp;gt;paging || $this-&amp;gt;pageByName)&lt;br /&gt;
				$this-&amp;gt;gridHTML .= $this-&amp;gt;getPagingHTML();	&lt;br /&gt;
			&lt;br /&gt;
		if ($this-&amp;gt;paging || $this-&amp;gt;pageByName)&lt;br /&gt;
			$this-&amp;gt;gridHTML .= $this-&amp;gt;getPaging_supportScripts();		&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	private function getPagingHTML()&lt;br /&gt;
	{&lt;br /&gt;
		if ($this-&amp;gt;pageByName)&lt;br /&gt;
		{&lt;br /&gt;
			$this-&amp;gt;prepAlphabetIndex();&lt;br /&gt;
&lt;br /&gt;
			if ($this-&amp;gt;curPgAlphaIndex=="" &amp;amp;&amp;amp; count($this-&amp;gt;pgAlphaIndexKeys)&amp;gt;0)&lt;br /&gt;
				$this-&amp;gt;curPgAlphaIndex = $this-&amp;gt;pgAlphaIndexKeys[1];&lt;br /&gt;
				&lt;br /&gt;
			return $this-&amp;gt;getAlphabetIndex_HTML();&lt;br /&gt;
		}&lt;br /&gt;
		elseif($this-&amp;gt;paging)&lt;br /&gt;
		{&lt;br /&gt;
			$this-&amp;gt;prepPageIndex();&lt;br /&gt;
			&lt;br /&gt;
			return $this-&amp;gt;getPageIndex_HTML();&lt;br /&gt;
		}	&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	private function prepPageIndex()&lt;br /&gt;
	{		&lt;br /&gt;
		$totRows = $this-&amp;gt;resultSet-&amp;gt;num_rows;	&lt;br /&gt;
		$this-&amp;gt;totPages = ceil($totRows/$this-&amp;gt;paging_NoOfRows);&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	private function getPageIndex_HTML()&lt;br /&gt;
	{	&lt;br /&gt;
		if ($this-&amp;gt;paging_byPageNos)&lt;br /&gt;
		{&lt;br /&gt;
			$html = "&amp;lt;div style='padding:2px 5px 2px 5px;background-color:".$this-&amp;gt;headBackgroundColor.";".&lt;br /&gt;
					"color:".$this-&amp;gt;headForeColor.";width:".($this-&amp;gt;width-10)."px;border:0px solid red;text-align:center;".&lt;br /&gt;
					"margin:10px 0px 0px 0px;'&amp;gt; Pages - ";		&lt;br /&gt;
		&lt;br /&gt;
			for($idx = 1; $idx&amp;lt;=$this-&amp;gt;totPages; $idx++)&lt;br /&gt;
			{&lt;br /&gt;
				$linkStr = "".$idx;&lt;br /&gt;
			&lt;br /&gt;
				if ($this-&amp;gt;curPgIndex == $idx)&lt;br /&gt;
					$linkStr = "&amp;lt;span style='font-weight:bold;font-size:1.4em;'&amp;gt;$linkStr&amp;lt;/span&amp;gt;";&lt;br /&gt;
				else&lt;br /&gt;
					$linkStr = "&amp;lt;a href=\"javascript:florDBgrid_action('pg',$idx);\" style='color:".$this-&amp;gt;headForeColor.";'&amp;gt;".&lt;br /&gt;
									$linkStr."&amp;lt;/a&amp;gt;";&lt;br /&gt;
			&lt;br /&gt;
				if ($idx == 1) &lt;br /&gt;
					$html .= $linkStr." &amp;amp;nbsp;";&lt;br /&gt;
				elseif($idx == $this-&amp;gt;totPages)&lt;br /&gt;
					$html .= " ".$linkStr." ";&lt;br /&gt;
				else&lt;br /&gt;
					$html .= " ".$linkStr." &amp;amp;nbsp;";&lt;br /&gt;
			}		&lt;br /&gt;
		}&lt;br /&gt;
		elseif ($this-&amp;gt;paging_byNextPrev)&lt;br /&gt;
		{&lt;br /&gt;
			$html = "&amp;lt;div style='padding:2px 5px 2px 5px;background-color:".$this-&amp;gt;headBackgroundColor.";".&lt;br /&gt;
					"color:".$this-&amp;gt;headForeColor.";width:".($this-&amp;gt;width-10)."px;border:0px solid red;text-align:right;".&lt;br /&gt;
					"margin:10px 0px 0px 0px;'&amp;gt;";&lt;br /&gt;
			&lt;br /&gt;
			$prevPage = true; $nextPage = true;&lt;br /&gt;
			&lt;br /&gt;
			if ($this-&amp;gt;curPgIndex == 1)&lt;br /&gt;
				$prevPage = false;&lt;br /&gt;
			if ($this-&amp;gt;curPgIndex == $this-&amp;gt;totPages)&lt;br /&gt;
				$nextPage = false;&lt;br /&gt;
			&lt;br /&gt;
			if ($prevPage)&lt;br /&gt;
				$html .= "&amp;lt;a href=\"javascript:florDBgrid_action('pg',".($this-&amp;gt;curPgIndex-1).");\" style='color:".$this-&amp;gt;headForeColor.";'&amp;gt;".&lt;br /&gt;
									"&amp;amp;lt; Prev&amp;lt;/a&amp;gt;&amp;amp;nbsp;&amp;amp;nbsp;";&lt;br /&gt;
			if($nextPage)&lt;br /&gt;
				$html .= "&amp;lt;a href=\"javascript:florDBgrid_action('pg',".($this-&amp;gt;curPgIndex+1).");\" style='color:".$this-&amp;gt;headForeColor.";'&amp;gt;".&lt;br /&gt;
									"Next &amp;amp;gt;&amp;lt;/a&amp;gt;";&lt;br /&gt;
		}&lt;br /&gt;
		&lt;br /&gt;
		$html .= "&amp;lt;/div&amp;gt;";&lt;br /&gt;
		&lt;br /&gt;
		return $html;&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	private function prepAlphabetIndex()&lt;br /&gt;
	{&lt;br /&gt;
		$db = new flor_db_process();&lt;br /&gt;
		$db-&amp;gt;resultSet = $this-&amp;gt;resultSet;&lt;br /&gt;
&lt;br /&gt;
		$this-&amp;gt;pgAlphaIndexKeys = array("");&lt;br /&gt;
	&lt;br /&gt;
		while(1)&lt;br /&gt;
		{&lt;br /&gt;
			$row = $db-&amp;gt;getRow2();&lt;br /&gt;
			if (!$row)&lt;br /&gt;
				break;&lt;br /&gt;
				&lt;br /&gt;
			$tmpCellVal = $row[$this-&amp;gt;pageByName_field];&lt;br /&gt;
			$tmpChar = strtoupper(substr($tmpCellVal,0,1));&lt;br /&gt;
			if (is_numeric($tmpChar) &amp;amp;&amp;amp; !array_search("0-9",$this-&amp;gt;pgAlphaIndexKeys))&lt;br /&gt;
				array_push($this-&amp;gt;pgAlphaIndexKeys, "0-9");	&lt;br /&gt;
			if (!array_search($tmpChar,$this-&amp;gt;pgAlphaIndexKeys))&lt;br /&gt;
				array_push($this-&amp;gt;pgAlphaIndexKeys, $tmpChar);			&lt;br /&gt;
		}&lt;br /&gt;
		&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	private function getAlphabetIndex_HTML()&lt;br /&gt;
	{&lt;br /&gt;
		$html = "&amp;lt;div style='padding:2px 5px 2px 5px;background-color:".$this-&amp;gt;headBackgroundColor.";".&lt;br /&gt;
				"color:".$this-&amp;gt;headForeColor.";width:".($this-&amp;gt;width-10)."px;border:0px solid red;text-align:center;".&lt;br /&gt;
				"margin:10px 0px 0px 0px;'&amp;gt;";&lt;br /&gt;
		&lt;br /&gt;
		$alphabets = preg_split('//', "ABCDEFGHIJKLMNOPQRSTUVWXYZ", -1, PREG_SPLIT_NO_EMPTY);&lt;br /&gt;
		$chars = array("0-9");&lt;br /&gt;
		$chars = array_merge($chars,$alphabets);&lt;br /&gt;
&lt;br /&gt;
		foreach($chars as $char)&lt;br /&gt;
		{&lt;br /&gt;
			$linkStr = $char;&lt;br /&gt;
&lt;br /&gt;
			if ($this-&amp;gt;curPgAlphaIndex == $char || (is_numeric($this-&amp;gt;curPgAlphaIndex) &amp;amp;&amp;amp; $char=="0-9"))&lt;br /&gt;
				$linkStr = "&amp;lt;span style='font-weight:bold;font-size:1.4em;'&amp;gt;$linkStr&amp;lt;/span&amp;gt;";&lt;br /&gt;
			elseif (array_search($char,$this-&amp;gt;pgAlphaIndexKeys))&lt;br /&gt;
				$linkStr = "&amp;lt;a href=\"javascript:florDBgrid_action('pga','$char')
;\" style='color:".$this-&amp;gt;headForeColor.";'&amp;gt;".&lt;br /&gt;
								$linkStr."&amp;lt;/a&amp;gt;";&lt;br /&gt;
	&lt;br /&gt;
			if ($char == "0-9") &lt;br /&gt;
				$html .= $linkStr." &amp;amp;nbsp;";&lt;br /&gt;
			elseif($char =="Z")&lt;br /&gt;
				$html .= " ".$linkStr." ";&lt;br /&gt;
			else&lt;br /&gt;
				$html .= " ".$linkStr." &amp;amp;nbsp;";&lt;br /&gt;
		}&lt;br /&gt;
		&lt;br /&gt;
		$html .= "&amp;lt;/div&amp;gt;";&lt;br /&gt;
&lt;br /&gt;
		return $html;&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	private function getPaging_supportScripts()&lt;br /&gt;
	{&lt;br /&gt;
		$html = &amp;lt;&amp;lt;&amp;lt;END&lt;br /&gt;
				&amp;lt;input type=hidden name=flor_grid_a id=flor_grid_a value=""/&amp;gt;&lt;br /&gt;
				&amp;lt;input type=hidden name=flor_grid_aV id=flor_grid_aV value=""/&amp;gt;&lt;br /&gt;
				&lt;br /&gt;
			&amp;lt;script language="javascript"&amp;gt;&lt;br /&gt;
			&amp;lt;!--//&lt;br /&gt;
			function florDBgrid_action(action, value)&lt;br /&gt;
			{&lt;br /&gt;
				var F = document.forms['frmAction'];&lt;br /&gt;
				&lt;br /&gt;
				F.flor_grid_a.value = action;&lt;br /&gt;
				F.flor_grid_aV.value = value;&lt;br /&gt;
				&lt;br /&gt;
				F.submit();&lt;br /&gt;
			}&lt;br /&gt;
			//--&amp;gt;	&lt;br /&gt;
			&amp;lt;/script&amp;gt;&lt;br /&gt;
		&lt;br /&gt;
END;&lt;br /&gt;
&lt;br /&gt;
		return $html;	&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	private function initDataInfo()&lt;br /&gt;
	{&lt;br /&gt;
		if ($this-&amp;gt;autoColumns)&lt;br /&gt;
		{&lt;br /&gt;
			if ($this-&amp;gt;resultSet)&lt;br /&gt;
			{&lt;br /&gt;
				$this-&amp;gt;colInfo = $this-&amp;gt;resultSet-&amp;gt;fetch_fields();&lt;br /&gt;
				$this-&amp;gt;columnCount = count($this-&amp;gt;colInfo);&lt;br /&gt;
			&lt;br /&gt;
				for($i=0; $i&amp;lt;$this-&amp;gt;columnCount; $i++)&lt;br /&gt;
				{&lt;br /&gt;
					$col = new Column();&lt;br /&gt;
					$col-&amp;gt;fieldName = $this-&amp;gt;colInfo[$i]-&amp;gt;name;&lt;br /&gt;
					$this-&amp;gt;colSet[$i] = $col;&lt;br /&gt;
				}&lt;br /&gt;
			}	&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
		{&lt;br /&gt;
			$this-&amp;gt;columnCount = count($this-&amp;gt;colSet);&lt;br /&gt;
		}	&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	private function getDataHTML()&lt;br /&gt;
	{&lt;br /&gt;
		$tmpHTML = "";&lt;br /&gt;
&lt;br /&gt;
		$db = new flor_db_process();&lt;br /&gt;
		$db-&amp;gt;resultSet = $this-&amp;gt;resultSet;&lt;br /&gt;
		$db-&amp;gt;reset();&lt;br /&gt;
		&lt;br /&gt;
		$gridHeaderComplete = false;&lt;br /&gt;
		if (!$gridHeaderComplete)&lt;br /&gt;
		{&lt;br /&gt;
			$tmpHTML = $this-&amp;gt;getHeaderHTML();&lt;br /&gt;
			&lt;br /&gt;
			$gridHeaderComplete = true;&lt;br /&gt;
		}&lt;br /&gt;
		&lt;br /&gt;
		if ($this-&amp;gt;resultSet)&lt;br /&gt;
		{&lt;br /&gt;
			$this-&amp;gt;rowCount = $this-&amp;gt;resultSet-&amp;gt;num_rows;&lt;br /&gt;
&lt;br /&gt;
			if ($this-&amp;gt;rowCount==0)&lt;br /&gt;
				$tmpHTML .= $this-&amp;gt;getTableHTML("NODATA");&lt;br /&gt;
			else&lt;br /&gt;
			{&lt;br /&gt;
				while($tmpRow = $db-&amp;gt;getRow2())&lt;br /&gt;
				{&lt;br /&gt;
					$this-&amp;gt;curRowId++;&lt;br /&gt;
					&lt;br /&gt;
					if ($this-&amp;gt;pageByName)&lt;br /&gt;
					{&lt;br /&gt;
						$tmpCellVal = $tmpRow[$this-&amp;gt;pageByName_field];&lt;br /&gt;
						if (!$tmpCellVal)&lt;br /&gt;
							continue;		//skip row&lt;br /&gt;
						&lt;br /&gt;
						$tmpStr1 = strtoupper(substr($tmpCellVal,0,1));&lt;br /&gt;
				&lt;br /&gt;
						if (is_numeric($tmpStr1) &amp;amp;&amp;amp; $this-&amp;gt;curPgAlphaIndex == "0-9")&lt;br /&gt;
						{&lt;br /&gt;
							//is numeric value&lt;br /&gt;
						}&lt;br /&gt;
						elseif ($tmpStr1 != strtoupper($this-&amp;gt;curPgAlphaIndex))&lt;br /&gt;
							continue;	//skip row	&lt;br /&gt;
&lt;br /&gt;
					}&lt;br /&gt;
					elseif($this-&amp;gt;paging)&lt;br /&gt;
					{&lt;br /&gt;
						if ($this-&amp;gt;curPgIndex == 1)&lt;br /&gt;
							$lowRowID = 0;&lt;br /&gt;
						else&lt;br /&gt;
							$lowRowID = (($this-&amp;gt;curPgIndex-1) * $this-&amp;gt;paging_NoOfRows)+1;&lt;br /&gt;
						$hiRowID = $this-&amp;gt;curPgIndex * $this-&amp;gt;paging_NoOfRows;&lt;br /&gt;
&lt;br /&gt;
						if ($this-&amp;gt;curRowId &amp;gt;= $lowRowID &amp;amp;&amp;amp;&lt;br /&gt;
							$this-&amp;gt;curRowId &amp;lt;= $hiRowID)&lt;br /&gt;
						{&lt;br /&gt;
							//allow row.. it belongs to page &lt;br /&gt;
						}	 &lt;br /&gt;
						else&lt;br /&gt;
							continue;	//skip row.&lt;br /&gt;
					}&lt;br /&gt;
					&lt;br /&gt;
					$tmpHTML .= $this-&amp;gt;getDataRowHTML($tmpRow);&lt;br /&gt;
				}&lt;br /&gt;
			}&lt;br /&gt;
		}&lt;br /&gt;
		else&lt;br /&gt;
			$tmpHTML .= $this-&amp;gt;getTableHTML("NODATA");&lt;br /&gt;
		&lt;br /&gt;
		&lt;br /&gt;
		//echo "*".$this-&amp;gt;rowCount."*".$this-&amp;gt;columnCount."*";&lt;br /&gt;
		//print_r($this-&amp;gt;colInfo);&lt;br /&gt;
		&lt;br /&gt;
		return $tmpHTML;&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	private function getAddNewRowHTML()&lt;br /&gt;
	{&lt;br /&gt;
		///if ($this-&amp;gt;resultSet)&lt;br /&gt;
		&lt;br /&gt;
		return "";&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	private function getDataRowHTML($rowData)&lt;br /&gt;
	{&lt;br /&gt;
		$t1 = "\n&amp;lt;tr&amp;gt;";&lt;br /&gt;
		&lt;br /&gt;
		$this-&amp;gt;curColId = -1;&lt;br /&gt;
&lt;br /&gt;
		$cells = array();&lt;br /&gt;
		foreach($this-&amp;gt;colSet as $colItem)&lt;br /&gt;
		{&lt;br /&gt;
			$this-&amp;gt;curColId++;&lt;br /&gt;
		&lt;br /&gt;
			if ($colItem-&amp;gt;fieldName!=null)&lt;br /&gt;
				$cellContent = $rowData[$colItem-&amp;gt;fieldName];&lt;br /&gt;
			else&lt;br /&gt;
				$cellContent = "";&lt;br /&gt;
		&lt;br /&gt;
			//row item bound event &lt;br /&gt;
			//call data_rowItem_bound event handler&lt;br /&gt;
			$cell = new cell();&lt;br /&gt;
			$cell-&amp;gt;rowId = $this-&amp;gt;curRowId;&lt;br /&gt;
			$cell-&amp;gt;colId = $this-&amp;gt;curColId;&lt;br /&gt;
			$cell-&amp;gt;dataKey = $rowData[$this-&amp;gt;dataKey];&lt;br /&gt;
			$cell-&amp;gt;HTMLContent = $cellContent;&lt;br /&gt;
			&lt;br /&gt;
			array_push($cells, $cell);&lt;br /&gt;
		}&lt;br /&gt;
&lt;br /&gt;
		if ($this-&amp;gt;onRowItem_Bound != null)&lt;br /&gt;
		{&lt;br /&gt;
			$tmpFn = $this-&amp;gt;onRowItem_Bound;&lt;br /&gt;
			$cells = $tmpFn($cells);	//passing a row.. for each row this entire fn is called. 		&lt;br /&gt;
		}&lt;br /&gt;
		&lt;br /&gt;
		$j=-1;&lt;br /&gt;
		foreach($this-&amp;gt;colSet as $colItem)&lt;br /&gt;
		{&lt;br /&gt;
			$j++;&lt;br /&gt;
		&lt;br /&gt;
			$t1 .= "\n&amp;lt;td style=\"".$this-&amp;gt;fontStyle."\"&amp;gt;\n".&lt;br /&gt;
					$cells[$j]-&amp;gt;HTMLContent.&lt;br /&gt;
					"\n&amp;lt;/td&amp;gt;";&lt;br /&gt;
		}&lt;br /&gt;
		&lt;br /&gt;
		$t1 .= "\n&amp;lt;/tr&amp;gt;";&lt;br /&gt;
		&lt;br /&gt;
		return $t1;&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	private function getHeaderHTML()&lt;br /&gt;
	{&lt;br /&gt;
		if (!$this-&amp;gt;colSet)&lt;br /&gt;
			return "";&lt;br /&gt;
			&lt;br /&gt;
		$t1 = "\n&amp;lt;tr&amp;gt;";&lt;br /&gt;
		&lt;br /&gt;
		$headStyle = "background-color:".$this-&amp;gt;headBackgroundColor.";color:".&lt;br /&gt;
						$this-&amp;gt;headForeColor.";";&lt;br /&gt;
		&lt;br /&gt;
		foreach($this-&amp;gt;colSet as $colItem)&lt;br /&gt;
		{&lt;br /&gt;
			if ($colItem-&amp;gt;displayName != null)&lt;br /&gt;
				$tmpText = $colItem-&amp;gt;displayName;&lt;br /&gt;
			else&lt;br /&gt;
				$tmpText = $colItem-&amp;gt;fieldName;&lt;br /&gt;
			&lt;br /&gt;
			if ($colItem-&amp;gt;width!=null)&lt;br /&gt;
				$colW = "width='".$colItem-&amp;gt;width."' ";&lt;br /&gt;
			else&lt;br /&gt;
				$colW = "";&lt;br /&gt;
				&lt;br /&gt;
			$t1 .= "\n&amp;lt;td $colW style=\"font-weight:bold;".$this-&amp;gt;fontStyle.$headStyle."\"&amp;gt;\n".&lt;br /&gt;
					$tmpText.&lt;br /&gt;
					"\n&amp;lt;/td&amp;gt;";&lt;br /&gt;
			&lt;br /&gt;
		}&lt;br /&gt;
		&lt;br /&gt;
		$t1 .= "\n&amp;lt;/tr&amp;gt;";&lt;br /&gt;
		&lt;br /&gt;
		return $t1;&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	private function getTableHTML($code)&lt;br /&gt;
	{&lt;br /&gt;
		switch(strtoupper($code))&lt;br /&gt;
		{&lt;br /&gt;
			case "OPEN":&lt;br /&gt;
				$pad = $this-&amp;gt;cellPadding;&lt;br /&gt;
				$bw = $this-&amp;gt;borderWidth;&lt;br /&gt;
				$bc = $this-&amp;gt;borderColor;&lt;br /&gt;
				$bs = $this-&amp;gt;borderStyle;&lt;br /&gt;
				&lt;br /&gt;
				&lt;br /&gt;
				return "&amp;lt;table border=$bw width=".$this-&amp;gt;width." cellpadding=$pad ".&lt;br /&gt;
						 "style=\"margin:10px 0px 10px 0px;border-collapse:collapse;border-style:$bs;\" borderColor='$bc'&amp;gt;";&lt;br /&gt;
&lt;br /&gt;
				break;&lt;br /&gt;
		&lt;br /&gt;
			case "CLOSE":&lt;br /&gt;
				return "\n&amp;lt;/table&amp;gt;";&lt;br /&gt;
				break;&lt;br /&gt;
				&lt;br /&gt;
			case "NODATA":&lt;br /&gt;
				if ($this-&amp;gt;columnCount&amp;gt;1)&lt;br /&gt;
					$colspan= "colspan='".$this-&amp;gt;columnCount."' ";&lt;br /&gt;
				else&lt;br /&gt;
					$colspan=" ";&lt;br /&gt;
			&lt;br /&gt;
				return "\n&amp;lt;tr&amp;gt;\n&amp;lt;td style='font-weight:bold;border:1px dotted gray;padding:4px;".&lt;br /&gt;
						$this-&amp;gt;fontStyle."' $colspan&amp;gt;No Data&amp;lt;/td&amp;gt;\n&amp;lt;/tr&amp;gt;";&lt;br /&gt;
&lt;br /&gt;
				break;&lt;br /&gt;
				&lt;br /&gt;
			case "ALPHA_INDEX":&lt;br /&gt;
				$this-&amp;gt;prepAlphabetIndex();&lt;br /&gt;
				$tmpHTML = $this-&amp;gt;getAlphabetIndex_HTML();&lt;br /&gt;
		&lt;br /&gt;
				if ($this-&amp;gt;columnCount&amp;gt;1)&lt;br /&gt;
					$colspan= "colspan='".$this-&amp;gt;columnCount."' ";&lt;br /&gt;
				else&lt;br /&gt;
					$colspan=" ";&lt;br /&gt;
				&lt;br /&gt;
				$tmpHTML = "\n&amp;lt;tr&amp;gt;\n&amp;lt;td style='font-weight:bold;border:1px dotted gray;padding:4px;".&lt;br /&gt;
						$this-&amp;gt;fontStyle."' $colspan&amp;gt;".$tmpHTML."&amp;lt;/td&amp;gt;\n&amp;lt;/tr&amp;gt;";&lt;br /&gt;
				&lt;br /&gt;
				return $tmpHTML;&lt;br /&gt;
				&lt;br /&gt;
				break;&lt;br /&gt;
		&lt;br /&gt;
		}&lt;br /&gt;
	&lt;br /&gt;
	}  &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class column{&lt;br /&gt;
	public $displayName = null;&lt;br /&gt;
	public $fieldName = null;&lt;br /&gt;
	public $dataFormat = null;&lt;br /&gt;
	public $width = null;&lt;br /&gt;
	public $backgroundColor = null;&lt;br /&gt;
	&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class cell{&lt;br /&gt;
	public $rowId = null;&lt;br /&gt;
	public $colId = null;&lt;br /&gt;
	public $dataKey = null;&lt;br /&gt;
	public $HTMLContent = null;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <pubDate>Sun, 26 Oct 2008 00:12:12 -0700</pubDate>
      <category>PHP</category>
    </item>
    <item>
      <title>Menu Items</title>
      <link>http://www.programmersheaven.com/mb/phpstuff/381350/381350/menu-items/</link>
      <description>Hi there&lt;br /&gt;
&lt;br /&gt;
I have this very simple menu item ,  but I am not sure how to connect a from to my menu items , i.e. I need my search.php form to open once the user clicks on the search menu item. Please can someone take a look.&lt;br /&gt;
&lt;br /&gt;
Thanking you in advance. Regards.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;index.php&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php require_once("menuHandler.php"); ?&amp;gt;&lt;br /&gt;
	&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&lt;br /&gt;
   &amp;lt;title&amp;gt;MicroMetaSpider - Check website META information&amp;lt;/title&amp;gt;&lt;br /&gt;
   &amp;lt;link href="style/style.css" rel="stylesheet" type="text/css" /&amp;gt;&lt;br /&gt;
&amp;lt;/head&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
    &amp;lt;div id="main"&amp;gt;&lt;br /&gt;
      &amp;lt;div class="caption"&amp;gt;Medex Information System&amp;lt;/div&amp;gt;&lt;br /&gt;
      &amp;lt;div id="container"&amp;gt;&lt;br /&gt;
         &amp;lt;div id="menu"&amp;gt;&amp;lt;?php createMenu('link-3'); ?&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
         &amp;lt;div id="content"&amp;gt;&lt;br /&gt;
            &amp;lt;p&amp;gt;This is a Medex Index Page!&amp;lt;/p&amp;gt;&lt;br /&gt;
         &amp;lt;/div&amp;gt;&lt;br /&gt;
      &amp;lt;/div&amp;gt;&lt;br /&gt;
      &amp;lt;div id="source"&amp;gt;2008 - Medex Information Systems&amp;lt;/div&amp;gt;&lt;br /&gt;
   &amp;lt;/div&amp;gt;   &lt;br /&gt;
&amp;lt;/body&amp;gt;   &lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;menuStruct.php&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
	// Main menu items&lt;br /&gt;
	$mainMenu['Help']      = 'link-1';&lt;br /&gt;
	$mainMenu['Admin Functions']  = 'link-2';&lt;br /&gt;
	$mainMenu['Modules']  = 'link-3';&lt;br /&gt;
	$mainMenu['Support']   = 'link-4';&lt;br /&gt;
	$mainMenu['Others']    = 'link-5';&lt;br /&gt;
	&lt;br /&gt;
	// Sub menu items&lt;br /&gt;
	$subMenu['Modules']['Patient Demographics'] = 'sub-link-1';&lt;br /&gt;
	$subMenu['Modules']['Search'] = 'sub-link-2';&lt;br /&gt;
	$subMenu['Modules']['Visits'] = 'sub-link-3';&lt;br /&gt;
	$subMenu['Modules']['Reports'] = 'sub-link-4';&lt;br /&gt;
	&lt;br /&gt;
	$subMenu['Others']['SubMenu-1']   = 'sub-link-11';&lt;br /&gt;
	$subMenu['Others']['SubMenu-2']   = 'sub-link-12';&lt;br /&gt;
	$subMenu['Others']['SubMenu-3']   = 'sub-link-13';&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;menuHandler.php&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
function createMenu($actLink){&lt;br /&gt;
	include_once('menuStruct.php'); &lt;br /&gt;
&lt;br /&gt;
	echo '&amp;lt;table class="menutable"&amp;gt;';&lt;br /&gt;
	&lt;br /&gt;
	// Get actual Main menu	&lt;br /&gt;
	$actMenu='';&lt;br /&gt;
	foreach ($mainMenu as $menu =&amp;gt; $link) {&lt;br /&gt;
		if ($link == $actLink) $actMenu = $menu;		&lt;br /&gt;
		if (isset($subMenu[$menu])){&lt;br /&gt;
		   foreach ($subMenu[$menu] as $menuSub =&amp;gt; $linkSub) {&lt;br /&gt;
 		   	  if ($linkSub == $actLink) $actMenu = $menu;		&lt;br /&gt;
		   }&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	&lt;br /&gt;
	foreach ($mainMenu as $menu =&amp;gt; $link) {&lt;br /&gt;
		echo '&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a href="'.$link.'"&amp;gt;'.$menu.'&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;';&lt;br /&gt;
		if ( ($actMenu == $menu) &amp;amp;&amp;amp; (isset($subMenu[$menu])) ){&lt;br /&gt;
		   foreach ($subMenu[$menu] as $menuSub =&amp;gt; $linkSub) {&lt;br /&gt;
 		   	  echo '&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;&amp;lt;a href="'.$linkSub.'" class="submenu"&amp;gt;'.$menuSub.'&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;';&lt;br /&gt;
		   }&lt;br /&gt;
		}&lt;br /&gt;
	}&lt;br /&gt;
	&lt;br /&gt;
	echo "&amp;lt;/table&amp;gt;";&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;</description>
      <pubDate>Sat, 25 Oct 2008 11:31:30 -0700</pubDate>
      <category>PHP</category>
    </item>
    <item>
      <title>Login page &amp; index.php</title>
      <link>http://www.programmersheaven.com/mb/phpstuff/381349/381349/login-page--indexphp/</link>
      <description>Hi There&lt;br /&gt;
&lt;br /&gt;
I have a very simple login script , my problem is that I have no idea how to display my &lt;strong&gt;index.php&lt;/strong&gt; once the user has successfully logged in. Please will someone be able to assist. Thank you for all your help so far , it is much appreciated.&lt;br /&gt;
&lt;br /&gt;
Regards.&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;main_login.php&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table width="300" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC"&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;form name="form1" method="post" action="checklogin.php"&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&lt;br /&gt;
&amp;lt;table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF"&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td colspan="3"&amp;gt;&amp;lt;strong&amp;gt;Member Login &amp;lt;/strong&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td width="78"&amp;gt;Username&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width="6"&amp;gt;:&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td width="294"&amp;gt;&amp;lt;input name="myusername" type="text" id="myusername"&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;Password&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;:&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;input name="mypassword" type="text" id="mypassword"&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;amp;nbsp;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;td&amp;gt;&amp;lt;input type="submit" name="Submit" value="Login"&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;/td&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;
checklogin.php&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
ob_start();&lt;br /&gt;
$host="localhost"; // Host name&lt;br /&gt;
$username=""; // Mysql username&lt;br /&gt;
$password=""; // Mysql password&lt;br /&gt;
$db_name="test"; // Database name&lt;br /&gt;
$tbl_name="members"; // Table name&lt;br /&gt;
&lt;br /&gt;
// Connect to server and select databse.&lt;br /&gt;
mysql_connect("$host", "$username", "$password")or die("cannot connect");&lt;br /&gt;
mysql_select_db("$db_name")or die("cannot select DB");&lt;br /&gt;
&lt;br /&gt;
// Define $myusername and $mypassword&lt;br /&gt;
$myusername=$_POST['myusername'];&lt;br /&gt;
$mypassword=$_POST['mypassword'];&lt;br /&gt;
&lt;br /&gt;
// To protect MySQL injection (more detail about MySQL injection)&lt;br /&gt;
$myusername = stripslashes($myusername);&lt;br /&gt;
$mypassword = stripslashes($mypassword);&lt;br /&gt;
$myusername = mysql_real_escape_string($myusername);&lt;br /&gt;
$mypassword = mysql_real_escape_string($mypassword);&lt;br /&gt;
&lt;br /&gt;
$sql="SELECT * FROM $tbl_name WHERE username='$myusername' and password='$mypassword'";&lt;br /&gt;
$result=mysql_query($sql);&lt;br /&gt;
&lt;br /&gt;
// Mysql_num_row is counting table row&lt;br /&gt;
$count=mysql_num_rows($result);&lt;br /&gt;
// If result matched $myusername and $mypassword, table row must be 1 row&lt;br /&gt;
&lt;br /&gt;
if($count==1){&lt;br /&gt;
// Register $myusername, $mypassword and redirect to file "login_success.php"&lt;br /&gt;
session_register("myusername");&lt;br /&gt;
session_register("mypassword");&lt;br /&gt;
header("location:login_success.php");&lt;br /&gt;
}&lt;br /&gt;
else {&lt;br /&gt;
echo "Wrong Username or Password";&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
ob_end_flush();&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;login_page.php&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?&lt;br /&gt;
session_start();&lt;br /&gt;
if(!session_is_registered(myusername)){&lt;br /&gt;
header("location:main_login.php");&lt;br /&gt;
}&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;
login_success.php&lt;/strong&gt;&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
Login Successful&lt;br /&gt;
&amp;lt;/body&amp;gt;&lt;br /&gt;
&amp;lt;/html&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;logout.php&lt;/strong&gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?&lt;br /&gt;
session_start();&lt;br /&gt;
session_destroy();&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;</description>
      <pubDate>Sat, 25 Oct 2008 11:22:20 -0700</pubDate>
      <category>PHP</category>
    </item>
    <item>
      <title>Creating a Webpage using OO PHP</title>
      <link>http://www.programmersheaven.com/mb/phpstuff/381288/381288/creating-a-webpage-using-oo-php/</link>
      <description>I am trying to get to grips with Object Oriented PHP. Last week we were given a exercise to do, which creates a webpage, using a class and a client which will call the class. I am totaly not getting the hang of this, and i am getting so frustraited with this. We are moving on to the next lesson this week, and i am worried i am going to fall behind, because i just cannot figure it out. Webpage.class.php holds the webpage class, where all the functions ect are held, and then i am supposed to use the client usewebpage.php to create a new webpage, but a week of trying, i have got nowhere, and i am hitting a brick wall trying to figure out how to do it.&lt;br /&gt;
&lt;br /&gt;
Is there any OO php peeps out there who could give me a hand please? I am in a mess.&lt;br /&gt;
&lt;br /&gt;
Thank You.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Webpage.class.php&lt;br /&gt;
&lt;pre class="sourcecode"&gt;&amp;lt;?php

/**
 *
 * This is a skeleton class for a Webpage class.  We have given you the method names
 * and a very brief comment on what those methods need to do.  You will need to implement the class yourself.
 *
 * Also, included with this file is a file that is a 'client' or 'user' of the class.
 * If you look at the way the client is using the class it'll give you some more clues about how
 * you might need to implement the methods that the client calls.
 *
 */

/**
* The class should be called: Webpage
* you will need attributes to hold at least the main sections of a page: the head, body and footer
*/
Class Webpage {

	private $head;
	private $addToBody;

	function __construct($head, $addToBody) {
    // Store the doctype into the attribute of the class
        $this-&amp;gt;head = $head;
        $this-&amp;gt;addToBody = $addToBody;
        //$this-&amp;gt;styles = array() ??????;

        } 

	function addToBody($toAdd){
   		$this-&amp;gt;addToBody .= $toAdd;
   		return;
		}

	function getPage(){
  		return $this-&amp;gt;head . $this-&amp;gt;addToBody;
		}

	}
/** Methods:
* A constructor
* The constructor for the class should accept at least two arguments: the title of the page, and an array of
* css filenames that it will use to create the appropriate code in the head section to link to those stylesheets
* The constructor should create the head section and footer section and give a default value for the body section
*
* addToBody
* a method called 'addToBody' that will add text to the body attribute of the webpage.  See the client to see how this method
* will be used - it'll give you a clue as to how to implement it.
*
* getPage
* a getPage method which has as a return value the various sections, head, body and footer, of the webpage concatenated together.
*
* Consider carefully the scope of all attributes and methods/functions.  Remember to make scope as restrictive
* as possible while still being consonant with the class working.
*
*/

?&amp;gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
usewebpage.php&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
&amp;lt;?php

/**
 *
 * @version $Id$
 * @copyright 2008
 */
// require the class definition file
require_once( 'webpage.class.php' );

// create a new instance of the webpage class passing the title and an array of stylesheets to the constructor
$page = new Webpage ("test", array( "dream.css", "main.css" ) );

// add new text to the page body
$page-&amp;gt;addToBody( "\n&amp;lt;p&amp;gt;This is my first page constructed with my webpage class&amp;lt;/p&amp;gt;" );
$page-&amp;gt;addToBody( "\n&amp;lt;p&amp;gt;Look a the source html of this page and notice the doctype, the title and stylesheets are all correctly included and the code should validate as xhtml&amp;lt;/p&amp;gt;");
$page-&amp;gt;addToBody( "&amp;lt;div id="header"&amp;gt;&amp;lt;img src="images/needs2007_small.png" /&amp;gt;");
$page-&amp;gt;addToBody( "&amp;lt;h1&amp;gt;Header&amp;lt;/h1&amp;gt;");
$page-&amp;gt;addToBody( "&amp;lt;/div&amp;gt;");

// echo the page contents back to the browser
echo $page-&amp;gt;getPage();


?&amp;gt;&lt;/pre&gt;</description>
      <pubDate>Tue, 21 Oct 2008 04:47:12 -0700</pubDate>
      <category>PHP</category>
    </item>
    <item>
      <title>User Input</title>
      <link>http://www.programmersheaven.com/mb/phpstuff/381283/381283/user-input/</link>
      <description>Hi there&lt;br /&gt;
&lt;br /&gt;
I have created the following HTML form for user input:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;form method="POST" action="new_update_delete.php"&amp;gt;&lt;br /&gt;
Patient Demographics:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
Identity Number:&lt;br /&gt;
&amp;lt;input type="text" id="identitynumber" name="identitynumber" /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
First Name:&lt;br /&gt;
&amp;lt;input type="text" id="firstname" name="firstname" /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Last Name:&lt;br /&gt;
&amp;lt;input type="text" id="lastname" name="lastname" /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;input type="submit" value="New" /&amp;gt;&lt;br /&gt;
&amp;lt;input type="submit" value="Update" /&amp;gt;&lt;br /&gt;
&amp;lt;input type="submit" value="Delete" /&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code to save,update,delete information is contained in my new_update_delete.php form.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
// Connect to database&lt;br /&gt;
$conn = mysql_connect('localhost','root') or trigger_error("SQL", E_USER_ERROR);&lt;br /&gt;
$db = mysql_select_db('patient',$conn) or trigger_error("SQL", E_USER_ERROR);&lt;br /&gt;
// Dump table in an array&lt;br /&gt;
$patientlist = array('id','firstname','lastname','identitynumber'
);&lt;br /&gt;
// Insert new patient&lt;br /&gt;
if($_POST['patientlist']) {&lt;br /&gt;
   // Clean&lt;br /&gt;
   $patientlist = mysql_real_escape_string($_POST['patientlist']);&lt;br /&gt;
   // Insert new patient record into table&lt;br /&gt;
   $sql = "INSERT INTO patientdemo (id,firstname,lastname,identitynumber) VALUES ('','$patientlist')";&lt;br /&gt;
   $result = mysql_query($sql, $conn) or trigger_error("SQL", E_USER_ERROR);&lt;br /&gt;
} // end if&lt;br /&gt;
&lt;br /&gt;
// Update existing patient record&lt;br /&gt;
if($_POST['patientlist']) {&lt;br /&gt;
   // for each name to change...&lt;br /&gt;
   foreach($_POST['patientlist'] as $cid =&amp;gt; $patientlist) {&lt;br /&gt;
      // Clean&lt;br /&gt;
      $id = mysql_real_escape_string($cid);&lt;br /&gt;
      $patientlist = mysql_real_escape_string($patientlist);&lt;br /&gt;
      // Update patient record in the table &lt;br /&gt;
      $sql = "UPDATE patientdemo SET name = '$patientdemo' WHERE id = '$id'";&lt;br /&gt;
      $result = mysql_query($sql, $conn) or trigger_error("SQL", E_USER_ERROR);&lt;br /&gt;
   } // end foreach&lt;br /&gt;
} // end if&lt;br /&gt;
   &lt;br /&gt;
// Delete patient record from table&lt;br /&gt;
if($_GET['patientlist']) {&lt;br /&gt;
   // Clean&lt;br /&gt;
   $patientlist = mysql_real_escape_string($_GET['patientlist']);&lt;br /&gt;
   // Delete record&lt;br /&gt;
   $sql = "DELETE FROM patientdemo WHERE id,firstname,lastname,identitynumber = '$patientlist'";&lt;br /&gt;
   $result = mysql_query($sql, $conn) or trigger_error("SQL", E_USER_ERROR);&lt;br /&gt;
} // end if&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I need some advice on how I can add,update and delete info users enter into the HTML form.&lt;br /&gt;
&lt;br /&gt;
Sorry , I know this is simple but I'm a complete newbie and keen to learn.&lt;br /&gt;
&lt;br /&gt;
Thanking you in advance. &lt;br /&gt;</description>
      <pubDate>Mon, 20 Oct 2008 13:33:02 -0700</pubDate>
      <category>PHP</category>
    </item>
    <item>
      <title>Search Facility</title>
      <link>http://www.programmersheaven.com/mb/phpstuff/381282/381282/search-facility/</link>
      <description>Hi there,&lt;br /&gt;
&lt;br /&gt;
I need some help please. I'm a newbie so please be patient!.&lt;br /&gt;
&lt;br /&gt;
I have created the following database:&lt;br /&gt;
&lt;br /&gt;
CREATE TABLE patientdemo (id INT(4) NOT NULL AUTO_INCREMENT PRIMARY KEY, firstname VARCHAR(30), lastname VARCHAR(30), identitynumber VARCHAR(30)); INSERT INTO patientdemo (firstname, lastname, identitynumber) VALUES ( "Alexa", "McDonald", "1234567890987"), ( "Devie", "Slater", "987654321124" )&lt;br /&gt;
&lt;br /&gt;
I then created an HTML form which has two section. It has a section where users can enter information they want to search for and then a table where I would like information to display in once the search has been preformed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;form method="POST" action="search.php"&amp;gt;&lt;br /&gt;
Search for patient:&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
First Name:&lt;br /&gt;
&amp;lt;input type="text" id="firstname" name="firstname" /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Last Name:&lt;br /&gt;
&amp;lt;input type="text" id="lastname" name="lastname" /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
Identity Number:&lt;br /&gt;
&amp;lt;input type="text" id="identitynumber" name="identitynumber" /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;&lt;br /&gt;
&amp;lt;input type="submit" value="Search!" /&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&lt;br /&gt;
&amp;lt;table border cellspacing=0 cellpadding=5&amp;gt;&lt;br /&gt;
  &amp;lt;caption align=bottom&amp;gt;&lt;br /&gt;
    &amp;lt;/caption&amp;gt;&lt;br /&gt;
  &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td colspan=10 rowspan=10&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;th colspan=10 align=center&amp;gt;Patient Report&amp;lt;/th&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;th&amp;gt;First Name&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;th&amp;gt;Last Name&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;th&amp;gt;Identity Number&amp;lt;/th&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I then wrote a search.php form that handles the code to display the search result.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
  // Connect to DB&lt;br /&gt;
  mysql_connect("localhost","root");&lt;br /&gt;
  mysql_select_db("patient");&lt;br /&gt;
&lt;br /&gt;
  $firstname = mysql_real_escape_string($_POST['firstname']);&lt;br /&gt;
  $lastname = mysql_real_escape_string ($_POST['lastname']);&lt;br /&gt;
  $identitynumber = mysql_real_escape_string ($_POST['identitynumber']);&lt;br /&gt;
&lt;br /&gt;
  // Perform the fulltext search&lt;br /&gt;
  $query = "SELECT id, firstname, lastname, identitynumber&lt;br /&gt;
            FROM patientdemo";&lt;br /&gt;
&lt;br /&gt;
  $result = mysql_query($query);&lt;br /&gt;
&lt;br /&gt;
  // If results were found, output them&lt;br /&gt;
  if (mysql_num_rows($result) &amp;gt; 0) {&lt;br /&gt;
  printf //Display in the following HTML Table&lt;br /&gt;
("&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&lt;br /&gt;
&amp;lt;table border cellspacing=0 cellpadding=5&amp;gt;&lt;br /&gt;
  &amp;lt;caption align=bottom&amp;gt;&lt;br /&gt;
    &amp;lt;/caption&amp;gt;&lt;br /&gt;
  &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;td colspan=10 rowspan=10&amp;gt;&amp;lt;/td&amp;gt;&lt;br /&gt;
    &amp;lt;th colspan=10 align=center&amp;gt;Patient Report&amp;lt;/th&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;&lt;br /&gt;
  &amp;lt;tr&amp;gt;&lt;br /&gt;
    &amp;lt;th&amp;gt;First Name&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;th&amp;gt;Last Name&amp;lt;/th&amp;gt;&lt;br /&gt;
    &amp;lt;th&amp;gt;Identity Number&amp;lt;/th&amp;gt;&lt;br /&gt;
  &amp;lt;/tr&amp;gt;");&lt;br /&gt;
        }&lt;br /&gt;
  else {&lt;br /&gt;
    printf("No results found");&lt;br /&gt;
  }&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So anyway , the problem is that I want to be able to search for information using the input boxes on the HTML form , and then the info must display in the table (also on the HTML form). How would I go about this.&lt;br /&gt;
&lt;br /&gt;
Once again I'm a newbie so patients please.&lt;br /&gt;
&lt;br /&gt;
Thanking you in advance.&lt;br /&gt;</description>
      <pubDate>Mon, 20 Oct 2008 11:23:54 -0700</pubDate>
      <category>PHP</category>
    </item>
    <item>
      <title>When include database connection i'm lost my script</title>
      <link>http://www.programmersheaven.com/mb/phpstuff/381149/381149/when-include-database-connection-im-lost-my-script/</link>
      <description>hi all,&lt;br /&gt;
&lt;br /&gt;
i'm begginers in php&lt;br /&gt;
&lt;br /&gt;
i have register form , and when i include database file i'm lost my program.&lt;br /&gt;
&lt;br /&gt;
and printout blank screen.&lt;br /&gt;
&lt;br /&gt;
i think the program excute database file then connect to database and stop program after that.&lt;br /&gt;
&lt;br /&gt;
my code:&lt;br /&gt;
&lt;hr /&gt;&lt;br /&gt;
if($error){&lt;br /&gt;
echo "Error:&amp;lt;br /&amp;gt; $message&amp;lt;hl&amp;gt;&amp;lt;br /&amp;gt;please try again";&lt;br /&gt;
}&lt;br /&gt;
else&lt;br /&gt;
{&lt;br /&gt;
if($username &amp;amp;&amp;amp; $pass &amp;amp;&amp;amp; $name &amp;amp;&amp;amp; $lastname &amp;amp;&amp;amp; $email){&lt;br /&gt;
    &lt;span style="color: Red;"&gt;include('mydatabase.php');&lt;/span&gt;&lt;br /&gt;
   // make sure the username is not already taken&lt;br /&gt;
   $query = "SELECT user_id FROM users WHERE username = \"$username\"";&lt;br /&gt;
   $result = @mysql_query($query);&lt;br /&gt;
   if(mysql_num_rows($result) == 0){&lt;br /&gt;
      $query = "INSERT INTO users(username, password, firstname, lastname, email, registeration_date)&lt;br /&gt;
                VALUES('$username','$pass','$name','$lastname','$e
mail',NOW())";&lt;br /&gt;
      $result = mysql_query($query);&lt;br /&gt;
      if($result){&lt;br /&gt;
         echo "Tahnks, your registration has been seccefule";&lt;br /&gt;
         mysql_close();&lt;br /&gt;
         }&lt;br /&gt;
      }&lt;br /&gt;
      else&lt;br /&gt;
      {&lt;br /&gt;
      echo "Sorry, username has already taken, please try again with deffrint username";&lt;br /&gt;
      }&lt;br /&gt;
      }&lt;br /&gt;
      else{&lt;br /&gt;
      echo "hi";&lt;br /&gt;
      }&lt;br /&gt;
       }&lt;br /&gt;
-----------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
so any one can help me &lt;br /&gt;</description>
      <pubDate>Mon, 13 Oct 2008 15:01:42 -0700</pubDate>
      <category>PHP</category>
    </item>
    <item>
      <title>Links in PHP app not working</title>
      <link>http://www.programmersheaven.com/mb/phpstuff/380092/380092/links-in-php-app-not-working/</link>
      <description>Hi there , I'm hoping that someone will be able to help me with a problem that I'm experiencing with this PHP script.&lt;br /&gt;
&lt;br /&gt;
The code itself isn’t working for me. When I copy and paste it into a php file and upload I get the main table but the edit and remove links do not show up. The add contacts link also doesn't work. I'm not to sure where I'm going wrong? Perhaps someone can advise.&lt;br /&gt;
&lt;br /&gt;
I'm using PHP version 5.2.6&lt;br /&gt;
&lt;br /&gt;
Thanking you in advance&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;html&amp;gt;&lt;br /&gt;
&amp;lt;head&amp;gt;&lt;br /&gt;
&amp;lt;title&amp;gt;Address Book&amp;lt;/title&amp;gt;&lt;br /&gt;
&amp;lt;/head&amp;gt;&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
// Connects to your Database &lt;br /&gt;
mysql_connect("localhost", "root") or die(mysql_error()); &lt;br /&gt;
mysql_select_db("address") or die(mysql_error()); &lt;br /&gt;
// Add a Contact&lt;br /&gt;
if ( $mode=="add") &lt;br /&gt;
{&lt;br /&gt;
Print '&amp;lt;h2&amp;gt;Add Contact&amp;lt;/h2&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt; &lt;br /&gt;
&amp;lt;form action=';&lt;br /&gt;
echo $PHP_SELF; &lt;br /&gt;
Print '&lt;br /&gt;
method=post&amp;gt; &lt;br /&gt;
&amp;lt;table&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Name:&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;input type="text" name="name" /&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Phone:&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;input type="text" name="phone" /&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Email:&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;input type="text" name="email" /&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td colspan="2" align="center"&amp;gt;&amp;lt;input type="submit" /&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; &lt;br /&gt;
&amp;lt;input type=hidden name=mode value=added&amp;gt;&lt;br /&gt;
&amp;lt;/table&amp;gt; &lt;br /&gt;
&amp;lt;/form&amp;gt; &amp;lt;p&amp;gt;';&lt;br /&gt;
} &lt;br /&gt;
&lt;br /&gt;
if ( $mode=="added") &lt;br /&gt;
{&lt;br /&gt;
mysql_query ("INSERT INTO address (name, phone, email) VALUES ('$name', '$phone', '$email')");&lt;br /&gt;
}&lt;br /&gt;
//Updating data&lt;br /&gt;
if ( $mode=="edit") &lt;br /&gt;
{ &lt;br /&gt;
Print '&amp;lt;h2&amp;gt;Edit Contact&amp;lt;/h2&amp;gt; &lt;br /&gt;
&amp;lt;p&amp;gt; &lt;br /&gt;
&amp;lt;form action='; &lt;br /&gt;
echo $PHP_SELF; &lt;br /&gt;
Print ' &lt;br /&gt;
method=post&amp;gt; &lt;br /&gt;
&amp;lt;table&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Name:&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;input type="text" value="'; &lt;br /&gt;
Print $name; &lt;br /&gt;
print '" name="name" /&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Phone:&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;input type="text" value="'; &lt;br /&gt;
Print $phone; &lt;br /&gt;
print '" name="phone" /&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;Email:&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;&amp;lt;input type="text" value="'; &lt;br /&gt;
Print $email; &lt;br /&gt;
print '" name="email" /&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; &lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td colspan="2" align="center"&amp;gt;&amp;lt;input type="submit" /&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt; &lt;br /&gt;
&amp;lt;input type=hidden name=mode value=edited&amp;gt; &lt;br /&gt;
&amp;lt;input type=hidden name=id value='; &lt;br /&gt;
Print $id; &lt;br /&gt;
print '&amp;gt; &lt;br /&gt;
&amp;lt;/table&amp;gt; &lt;br /&gt;
&amp;lt;/form&amp;gt; &amp;lt;p&amp;gt;'; &lt;br /&gt;
} &lt;br /&gt;
&lt;br /&gt;
if ( $mode=="edited") &lt;br /&gt;
{ &lt;br /&gt;
mysql_query ("UPDATE address SET name = '$name', phone = '$phone', email = '$email' WHERE id = $id"); &lt;br /&gt;
Print "Data Updated!&amp;lt;p&amp;gt;"; &lt;br /&gt;
} &lt;br /&gt;
//Removing Data&lt;br /&gt;
if ( $mode=="remove") &lt;br /&gt;
{&lt;br /&gt;
mysql_query ("DELETE FROM address where id=$id");&lt;br /&gt;
Print "Entry has been removed &amp;lt;p&amp;gt;";&lt;br /&gt;
}&lt;br /&gt;
//Address Book&lt;br /&gt;
$data = mysql_query("SELECT * FROM address ORDER BY name ASC") &lt;br /&gt;
or die(mysql_error()); &lt;br /&gt;
Print "&amp;lt;h2&amp;gt;Address Book&amp;lt;/h2&amp;gt;&amp;lt;p&amp;gt;"; &lt;br /&gt;
Print "&amp;lt;table border cellpadding=3&amp;gt;"; &lt;br /&gt;
Print "&amp;lt;tr&amp;gt;&amp;lt;th width=100&amp;gt;Name&amp;lt;/th&amp;gt;&amp;lt;th width=100&amp;gt;Phone&amp;lt;/th&amp;gt;&amp;lt;th width=200&amp;gt;Email&amp;lt;/th&amp;gt;&amp;lt;th width=100 colspan=2&amp;gt;Admin&amp;lt;/th&amp;gt;&amp;lt;/tr&amp;gt;"; Print "&amp;lt;td colspan=5 align=right&amp;gt;&amp;lt;a href=" .$_SERVER[’PHP_SELF’]. "?mode=add&amp;gt;Add Contact&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;"; &lt;br /&gt;
while($info = mysql_fetch_array( $data )) &lt;br /&gt;
{ &lt;br /&gt;
Print "&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;".$info['name'] . "&amp;lt;/td&amp;gt; "; &lt;br /&gt;
Print "&amp;lt;td&amp;gt;".$info['phone'] . "&amp;lt;/td&amp;gt; "; &lt;br /&gt;
Print "&amp;lt;td&amp;gt; &amp;lt;a href=mailto:".$info['email'] . "&amp;gt;" .$info['email'] . "&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;"; &lt;br /&gt;
Print "&amp;lt;td&amp;gt;&amp;lt;a href=" .$_SERVER[’PHP_SELF’]. "?id=" . $info['id'] ."&amp;amp;name=" . $info['name'] . "&amp;amp;phone=" . $info['phone'] ."&amp;amp;email=" . $info['email'] . "&amp;amp;mode=edit&amp;amp;gt;Edit&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;"; Print "&amp;lt;td&amp;gt;&amp;lt;a href=" .$_SERVER[’PHP_SELF’]. "?id=" . $info['id'] ."&amp;amp;mode=remove&amp;amp;gt;Remove&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;"; &lt;br /&gt;
} &lt;br /&gt;
Print "&amp;lt;/table&amp;gt;"; &lt;br /&gt;
?&amp;gt; &lt;br /&gt;
&amp;lt;/body&amp;gt; &lt;br /&gt;
&amp;lt;/html&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <pubDate>Sun, 12 Oct 2008 04:49:41 -0700</pubDate>
      <category>PHP</category>
    </item>
    <item>
      <title>I Need  help from a programer</title>
      <link>http://www.programmersheaven.com/mb/phpstuff/378226/378226/i-need--help-from-a-programer/</link>
      <description>I would like to create a new website for an online money making site which have a master person , he have two legs sides one right and left each legs have many right and left legs . My question is that if i enter the master person id into my site I need to show each legs details by tree view. How can I create this site? Which  is best programing language for my site ???? How much does it cost ???&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[url=http://www.relavis.com/default.htm]Mobile CRM [/url]&lt;br /&gt;</description>
      <pubDate>Tue, 07 Oct 2008 05:08:56 -0700</pubDate>
      <category>PHP</category>
    </item>
    <item>
      <title>space problem</title>
      <link>http://www.programmersheaven.com/mb/phpstuff/378141/378141/space-problem/</link>
      <description>When I want to display info from a table, I have a problem that creeps up when I have space. &lt;br /&gt;
&lt;br /&gt;
my code is&lt;br /&gt;
&lt;br /&gt;
while ( $row = mysql_fetch_array($result) )&lt;br /&gt;
   {&lt;br /&gt;
    $fname = $row['FNAME']; $lname = row['LNAME'];&lt;br /&gt;
    $email=$row['EMAILADDR']; $addr = $row['STADDR'];&lt;br /&gt;
    $phone = $row['PHONE'];&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
and then &lt;br /&gt;
&lt;br /&gt;
echo('*First Name &amp;lt;input type=text maxlength=50 name=fname value=');&lt;br /&gt;
echo($fname);echo('&amp;gt;');echo('&amp;lt;br&amp;gt;');&lt;br /&gt;
echo('*Last Name &amp;lt;input type=text maxlength=50 name=lname value=');&lt;br /&gt;
echo($lname);echo('&amp;gt;');echo('&amp;lt;br&amp;gt;');&lt;br /&gt;
echo('*Email Address &amp;lt;input type=text maxlength=50 name=email value=');&lt;br /&gt;
echo($email);echo('&amp;gt;');echo('&amp;lt;br&amp;gt;');&lt;br /&gt;
echo('*Street Address &amp;lt;input type=text maxlength=50 name=addr value=');&lt;br /&gt;
echo($addr);echo('&amp;gt;');echo('&amp;lt;br&amp;gt;');&lt;br /&gt;
echo('*Phone Number &amp;lt;input type=text maxlength=50 name=phone value=');&lt;br /&gt;
echo($phone);echo('&amp;gt;');&lt;br /&gt;
&lt;br /&gt;
But when I use these input boxes to display, as soon as it hits a space, the rest is truncated. Like if the address is '409 main st'. In the database, the field contains '409 main st' and even if I use the echo(), '409 main st' appears. but if I use these input boxes, all that apears is '409'.&lt;br /&gt;
&lt;br /&gt;
Any suggestions on how to handle this?&lt;br /&gt;</description>
      <pubDate>Mon, 06 Oct 2008 13:52:20 -0700</pubDate>
      <category>PHP</category>
    </item>
    <item>
      <title>Stop the Spamming on this board</title>
      <link>http://www.programmersheaven.com/mb/phpstuff/378129/378129/stop-the-spamming-on-this-board/</link>
      <description>Please, mr/ms moderator. &lt;br /&gt;</description>
      <pubDate>Mon, 06 Oct 2008 12:47:52 -0700</pubDate>
      <category>PHP</category>
    </item>
    <item>
      <title>Uploading problem</title>
      <link>http://www.programmersheaven.com/mb/phpstuff/376101/376101/uploading-problem/</link>
      <description>I have this code block to restrict files uploaded to just images.&lt;br /&gt;
&lt;br /&gt;
if (($_FILES['upload']['type'] != 'image/gif') &lt;br /&gt;
||  ($_FILES['upload']['type'] != 'image/jpeg') &lt;br /&gt;
||  ($_FILES['upload']['type'] != 'image/jpg')&lt;br /&gt;
||  ($_FILES['upload']['type'] != 'image/bmp') &lt;br /&gt;
||  ($_FILES['upload']['type'] != 'image/png') )&lt;br /&gt;
   {&lt;br /&gt;
    echo($_FILES['upload']['type']);&lt;br /&gt;
    die("Not right file formatt. gif, jpeg, jpg,bmp, and png only");&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
But when I test it, I get the die message, even though I know my file type is correct. I even echo out the $_FILES['upload']['type']&lt;br /&gt;
&lt;br /&gt;
and I get image/jpeg&lt;br /&gt;
&lt;br /&gt;
Any ideas on what is wrong with my code?&lt;br /&gt;
&lt;br /&gt;</description>
      <pubDate>Fri, 26 Sep 2008 10:13:28 -0700</pubDate>
      <category>PHP</category>
    </item>
    <item>
      <title>PHP and Forms</title>
      <link>http://www.programmersheaven.com/mb/phpstuff/375937/375937/php-and-forms/</link>
      <description>Hello&lt;br /&gt;
&lt;br /&gt;
I am a total newby to PHP so please be lenient.&lt;br /&gt;
&lt;br /&gt;
I have the following question. I have a page in which the user must type in a number. If the number passes validation, then a function must be called to retrieve the information of the user. I want the rest of the page to become visible if the prior conditions have been met, and I also want the fields in this form to contain the neccesary information retrieved from the database.&lt;br /&gt;
&lt;br /&gt;
Can some one please provide me with a backbone structure as to how this would work?&lt;br /&gt;
&lt;br /&gt;
For instance&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
 &amp;lt;form name = "SubmitForm01" action = "Page.php" method = "Post"&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;/form&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
 &amp;lt;table&amp;gt; &lt;br /&gt;
   &amp;lt;tr&amp;gt; &lt;br /&gt;
     &amp;lt;td&amp;gt;&lt;br /&gt;
       &amp;lt;input type = "text" value = "VARIABLEFROM BACKEND" &amp;gt;&lt;br /&gt;
     &amp;lt;/td&amp;gt;&lt;br /&gt;
   &amp;lt;/tr&amp;gt;&lt;br /&gt;
 &amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;body&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thanking you in advance&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <pubDate>Wed, 24 Sep 2008 05:14:09 -0700</pubDate>
      <category>PHP</category>
    </item>
    <item>
      <title>help</title>
      <link>http://www.programmersheaven.com/mb/phpstuff/375550/375550/help/</link>
      <description>i would like to know how to create a list page whereby you can be able to click on a selected item and it records and shows how many items it has been selected&lt;br /&gt;</description>
      <pubDate>Fri, 19 Sep 2008 02:57:44 -0700</pubDate>
      <category>PHP</category>
    </item>
    <item>
      <title>help</title>
      <link>http://www.programmersheaven.com/mb/phpstuff/375549/375549/help/</link>
      <description>i would like to know how to create a list page whereby you can be able to click on a selected item and it records and shows how many items it has been selected&lt;br /&gt;</description>
      <pubDate>Fri, 19 Sep 2008 02:57:07 -0700</pubDate>
      <category>PHP</category>
    </item>
    <item>
      <title>Problem in WordPress plugin source</title>
      <link>http://www.programmersheaven.com/mb/phpstuff/375512/375512/problem-in-wordpress-plugin-source/</link>
      <description>So this is my plugin.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;&amp;lt;?php
/*
Plugin Name: Before maintainence
Plugin URI: &lt;a href="http://jbm.net76.net/?p=119"&gt;http://jbm.net76.net/?p=119&lt;/a&gt;
Description: Shows a message that site goes into maintainence soon.
Author: Johan Brodd
Version: 1
Author URI: &lt;a href="http://jbm.net76.net/?p=119"&gt;http://jbm.net76.net/?p=119&lt;/a&gt;
*/

function hello_world() {
 $hello = get_option(’hello_global’);
 Print(”$hello”);
}

function modify_menu() {
 add_options_page(
  ‘Hello World’,
  ‘Hello World’,
  ‘manage_options’,
  _File_,
  ‘admin_hello_options’
 );
}

function admin_hello_options(){
Print(”&amp;lt;h2&amp;gt;Hello World Plugin&amp;lt;/h2&amp;gt;”);
if ($_REQUEST['submit']){
 upate_hello_options();
}
print_hello_form();
}

function upate_hello_options(){
if ($_REQUEST['hello_global']) {
update_option(’hello_global’,$_REQUEST['hello_glob
al']);
}
}

function print_hello_form() {
$default_greeting = get_option(’hello_global’);
Print (”&amp;lt;form method=’post’&amp;gt;&amp;lt;label for=’hello_global’&amp;gt;Greeting:
&amp;lt;input type=’text’ name=’hello_global’ value=’$default_greeting’&amp;gt;
&amp;lt;/label&amp;gt;
&amp;lt;br /&amp;gt;
&amp;lt;input type=’submit’ name=’submit’ value=’Submit’ &amp;gt;
&amp;lt;/form&amp;gt;”);
}

?&amp;gt;&lt;/pre&gt;&lt;br /&gt;
This code generates an unexpected TVariable error. But I cannot find what the problem is.</description>
      <pubDate>Thu, 18 Sep 2008 08:49:50 -0700</pubDate>
      <category>PHP</category>
    </item>
    <item>
      <title>XML From U.S. Postal Service Site via php</title>
      <link>http://www.programmersheaven.com/mb/phpstuff/375500/375500/xml-from-us-postal-service-site-via-php/</link>
      <description>I'm trying to retrieve tracking information from the USPS site which accepts an XML request and returns an XML response. I can put the URL with the XML parameters into a browser and get back a response, but I'm having trouble with the php code to request the info and receive the response.&lt;br /&gt;
&lt;br /&gt;
Has anyone else done this with USPS tracking info via php and, if so, can you give me some guidance on the php code to use?&lt;br /&gt;</description>
      <pubDate>Thu, 18 Sep 2008 06:38:59 -0700</pubDate>
      <category>PHP</category>
    </item>
    <item>
      <title>This post has been deleted.</title>
      <link>http://www.programmersheaven.com/mb/phpstuff/375348/375348/this-post-has-been-deleted/</link>
      <description>This post has been deleted.</description>
      <pubDate>Mon, 15 Sep 2008 21:46:42 -0700</pubDate>
      <category>PHP</category>
    </item>
    <item>
      <title>implode function not working</title>
      <link>http://www.programmersheaven.com/mb/phpstuff/375198/375198/implode-function-not-working/</link>
      <description>Hello,&lt;br /&gt;
&lt;br /&gt;
I am trying to pass multiple values, via an implode function. However, it isn't working. Here is the code from the first page, then the second page.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
if(isset($_POST['numItems'])) {&lt;br /&gt;
$checkboxes = $_POST['numItems'];&lt;br /&gt;
$string = implode($value,"^");&lt;br /&gt;
echo $string;&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;form name='CartItem' action='https://www.ram-mount.com/RamCart/CartPutItem.php' method='POST'&amp;gt;&lt;br /&gt;
&amp;lt;input type='checkbox' name='numItems[]' value='RAM-VB-162'&amp;gt;&lt;br /&gt;
&amp;lt;input type='checkbox' name='numItems[]' value='RAM-VB-154'&amp;gt;&lt;br /&gt;
&amp;lt;input type='submit' value='Add To Cart'&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Second Page:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
include_once('./CartDBCxn.php');&lt;br /&gt;
if (!isset($_COOKIE['sess'])) {&lt;br /&gt;
session_start();&lt;br /&gt;
$usrSession = session_id();&lt;br /&gt;
setcookie('sess',$usrSession,0,'/','ram-mount.com');&lt;br /&gt;
} else {&lt;br /&gt;
$usrSession = $_COOKIE['sess'];&lt;br /&gt;
}&lt;br /&gt;
if (isset($_GET['act'])) {&lt;br /&gt;
if ($_GET['act'] == 'remove') {&lt;br /&gt;
removeCartItem($_GET['part'],$usrSession);&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
if (isset($_POST['numItems'])) {&lt;br /&gt;
// Process the update code&lt;br /&gt;
$numItems = $_POST['numItems'];&lt;br /&gt;
$items = $_POST;&lt;br /&gt;
echo ("\n\n\n &amp;lt;!-- ");&lt;br /&gt;
print_r($_POST);&lt;br /&gt;
echo (" --&amp;gt; \n\n\n");&lt;br /&gt;
for ($x=0;$x &amp;lt; $numItems; $x++) {&lt;br /&gt;
$itm = 'item'.($x+1);&lt;br /&gt;
$quan = 'Qty'.($x+1);&lt;br /&gt;
changeCartItem($items[$itm],$usrSession,$items[$qu
an]);&lt;br /&gt;
}&lt;br /&gt;
}&lt;br /&gt;
?&amp;gt;&lt;br /&gt;</description>
      <pubDate>Fri, 12 Sep 2008 10:38:13 -0700</pubDate>
      <category>PHP</category>
    </item>
    <item>
      <title>Can someone help me to connect .net web services with nusoap</title>
      <link>http://www.programmersheaven.com/mb/phpstuff/375134/375134/can-someone-help-me-to-connect-net-web-services-with-nusoap/</link>
      <description>Can someone help me to connect .net web services with nusoap,&lt;br /&gt;
&lt;br /&gt;
Here are the sample .net code to access the web services, &lt;br /&gt;
&lt;br /&gt;
public partial class WebServiceTest : System.Web.UI.Page&lt;br /&gt;
{&lt;br /&gt;
    protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;
    {&lt;br /&gt;
        this.cmdExecuteAction.ServerClick += new System.EventHandler(this.cmdExecuteAction_ServerCl
ick);&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    private void cmdExecuteAction_ServerClick(object sender, System.EventArgs e)&lt;br /&gt;
    {&lt;br /&gt;
        localhost.TestService TestService = new localhost.TestService();&lt;br /&gt;
        ExecuteActionRequest request = new ExecuteActionRequest();&lt;br /&gt;
        ExecuteActionResponse response = new ExecuteActionResponse();&lt;br /&gt;
		&lt;br /&gt;
        /**** add person ****/&lt;br /&gt;
        request.Action = Actions.Add;&lt;br /&gt;
        Person person = new Person();&lt;br /&gt;
        person.FirstName = "Johnny";&lt;br /&gt;
        person.LastName = "Roberts Jr";&lt;br /&gt;
        person.UserTypeCode = "MEM";&lt;br /&gt;
        person.HomePhone = "555-555-5555";&lt;br /&gt;
        person.HomePhone = "555-555-5555";&lt;br /&gt;
        person.CellPhone = "555-555-5555";&lt;br /&gt;
        person.PasswordHash = "dsfadsfasdfasdfasfzxcvcx";&lt;br /&gt;
        person.PasswordSalt = "jrob";&lt;br /&gt;
&lt;br /&gt;
        request.Person = person;&lt;br /&gt;
&lt;br /&gt;
        response = TestService.ExecuteAction(request);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Anyone please help me how to write the coding in php to access .net web services with using nusoap.&lt;br /&gt;
&lt;br /&gt;
Thanks in advance.&lt;br /&gt;</description>
      <pubDate>Thu, 11 Sep 2008 14:53:20 -0700</pubDate>
      <category>PHP</category>
    </item>
    <item>
      <title>How i create complex Feed back  form</title>
      <link>http://www.programmersheaven.com/mb/phpstuff/375113/375113/how-i-create-complex-feed-back--form/</link>
      <description>Hello ,&lt;br /&gt;
      I need help in feedback form. i create 7 fields. Frist name , last name , subject , message . i want if any field is empty he disply the error and go to return back in the current form. &lt;br /&gt;
Plz hellp me . Thanks&lt;br /&gt;</description>
      <pubDate>Thu, 11 Sep 2008 02:51:59 -0700</pubDate>
      <category>PHP</category>
    </item>
    <item>
      <title>Ebooks (PDF) related to Ruby and Rails and PHP, MySQL</title>
      <link>http://www.programmersheaven.com/mb/phpstuff/374948/374948/ebooks-pdf-related-to-ruby-and-rails-and-php-mysql/</link>
      <description>&lt;br /&gt;
hi, &lt;br /&gt;
&lt;br /&gt;
i find the find really heplful java books at the following link...&lt;br /&gt;
&lt;a href="#"&gt;&lt;br /&gt;
&lt;a href="http://books-pdf.blogspot.com"&gt;http://books-pdf.blogspot.com&lt;/a&gt;&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://books-pdf.blogspot.com"&gt;http://www.free-ebooks.net&lt;/a&gt;&lt;br /&gt;</description>
      <pubDate>Sat, 06 Sep 2008 04:46:35 -0700</pubDate>
      <category>PHP</category>
    </item>
  </channel>
</rss>