Hello Folks.
I'm new to PHP and web scripting in general so this a newb question.
Currently i'm a creating an instance to an object, yet when I call the constructor the script slienty shuts down... it doesn't call the next function and I don't know why. Any help would be welcome.
Here is the code.
<?php
class product {
var $ssProductName;
var $ssVendorName;
var $ssDescr;
var $ssURI;
// Clean constructor, strings must be cleaned before use
function __construct($ssProd, $ssVendor, $ssD, $ssU) {
$this->$ssProductName = $ssProd;
$this->$ssVendorName = $ssVendor;
$this->$ssDescr = $ssD;
$this->$ssURI = $ssU;
}
// print a table of the values
function DisplayOneEntry() {
echo '<table border="1">
<tr>
<td>'.$this->$ssProductName.'</td>
<td>'.$this->$ssVendorName.'</td>
<td>'.$this->$ssDescr.'</td>
<td>'.$this->$ssURI.'</td>
</tr>
</table>';
}
}
echo "<HTML>";
echo "A";
$newP = new product("Redhat", "Redhat corp", "Leader in", "www.redhat.com");
echo "B";
$newP->DisplayOneEntry();
echo "</HTML>";
?>
But the output is just:
<HTML>
A
Then nothing else.
This is running on a hosting provider using php 5.2.9 and Apache 2.2.