Byronwells
02-02-2010, 01:32 AM
Alright guys
I am wondering why is the date not be displayed properly on this page please http://www.digitalresellersvault.com/marketplace.php?cat=t&category=Private_Label_Rights
Let me start from the top
I have added a javascript date picker, and text box to the add products.html page.. Here is the code for that bit
<input type="text" name="product_date" value="{{product_date}}" id="date" size="20" />
<script>
$('#date').datepicker();
</script>
I know that bit works because it allows me to select whatever date I want and then it is showed in the text box..
I have then linked that text box to a field on a mysql database called product_date using these two pieces of code. The field is in date format
$product_date = $_POST["product_date"];
$set .= "product_date = '$product_date',";
The marketplace.php is used for the layout of the site.. The following code tells the page what to load up
$GetFile = file("http://www.digitalresellersvault.com/template/template.php");
$Content = join("", $GetFile);
$categories=$common->categories($db);
$content=str_replace("{categories}",$categories,$content);
$Pat = "/<{Begin}>(.*?)<{End}>/s";
preg_match($Pat,$Content,$Output);
$SelectedContent = $Output[1];
$q = "select * from ".$prefix."products where show_product = '1' ORDER BY Rand() LIMIT 1";
$r = $db->get_a_line($q);
$id = $r[id];
$imageurl = $r[imageurl];
$prod_description = $r[prod_description];
$salesprice = $r[price];
$product_name = $r[product_name];
$licence = $r[licence];
$product_date = $r[product_date];
$salespage_link='<a href="prods.php?pid='.$id.'"><img border="0" src="http://www.digitalresellersvault.com/template/images/moreinfobutton.jpg" width="104" height="16"></a>';
As stated before I can choose and date and then stored in on the database.. But for some reason I can not get the date to be displayed.. I can only get the 0000-00-00 to display..
I am a little bit confused
I am wondering why is the date not be displayed properly on this page please http://www.digitalresellersvault.com/marketplace.php?cat=t&category=Private_Label_Rights
Let me start from the top
I have added a javascript date picker, and text box to the add products.html page.. Here is the code for that bit
<input type="text" name="product_date" value="{{product_date}}" id="date" size="20" />
<script>
$('#date').datepicker();
</script>
I know that bit works because it allows me to select whatever date I want and then it is showed in the text box..
I have then linked that text box to a field on a mysql database called product_date using these two pieces of code. The field is in date format
$product_date = $_POST["product_date"];
$set .= "product_date = '$product_date',";
The marketplace.php is used for the layout of the site.. The following code tells the page what to load up
$GetFile = file("http://www.digitalresellersvault.com/template/template.php");
$Content = join("", $GetFile);
$categories=$common->categories($db);
$content=str_replace("{categories}",$categories,$content);
$Pat = "/<{Begin}>(.*?)<{End}>/s";
preg_match($Pat,$Content,$Output);
$SelectedContent = $Output[1];
$q = "select * from ".$prefix."products where show_product = '1' ORDER BY Rand() LIMIT 1";
$r = $db->get_a_line($q);
$id = $r[id];
$imageurl = $r[imageurl];
$prod_description = $r[prod_description];
$salesprice = $r[price];
$product_name = $r[product_name];
$licence = $r[licence];
$product_date = $r[product_date];
$salespage_link='<a href="prods.php?pid='.$id.'"><img border="0" src="http://www.digitalresellersvault.com/template/images/moreinfobutton.jpg" width="104" height="16"></a>';
As stated before I can choose and date and then stored in on the database.. But for some reason I can not get the date to be displayed.. I can only get the 0000-00-00 to display..
I am a little bit confused