hello all,
I currently have a list of products spit out from my db via a foreach loop. Right now I am styling these as a <li>
I want to style the list so that the annual and the monthly products are grouped together. This will probably mean using <div> instead of <li> and placing another loop inside the foreach to grab two products and put them in one div?
Any ideas how this might be structured??
should I use a for loop?
here is the current code:
Code: $productnames = '<center><table><tr><td><ul id="prodlist">'."n"; // list of products that can view this content
$show2all = false; // are one of the products the "all" flag?
$numcanview = 0; // the number of products that can view this post
foreach ($_product_id as $pid)
{
$pid = trim(strtolower($pid)); // make sure no extra spaces and not "ALL" or something
if ($pid=="all")
{
$show2all = true; // used later
} else {
$purl = $this->amprotectamroot.'member.php?price_group='.$allthepricegroups[$pid].'&product_id='.$pid;
$productnames .= '<li><a href="'.$purl.'">'.$alltheproducts[$pid].'</a></li>'."n";
$numcanview++;
}
Is it a good practice to store user info. in sessions?
I am making a user class for my script which stores all the user information in sessions. It takes user id as parameter and gets the info from database and stores it in the session variable. I did
shoping cart issues
i´ve wrote this and works when i add an item to, my cart, but when i want to add othrer item just replaces the last one. please help!!Code: [Select]<!DOCTYPE html PUBLIC "-//W3C//DTD
Auto-populating dropdowns and multiple forms.
Here's what I have so far:First drop down = select a state (works)This populates the second drop down (works)Second drop down = select a city (works)This populates the third drop down with local
returning data from an ssh2_exec()
here's what i got.$conn = ssh2_connect($this->_host); ssh2_auth_password($conn,$this->_user,$this->_pass)or die("Cannot Connect"); //build command line to include
AutoChoosing a CSS file based on URL
Hey everyone,I have a site that has multiple URLs and CSS files.Based on the URL that the user goes to I want that CSS file to load.This is what I have thus far in the <head> of my
Call Screen statement Error
Dear Experts,
ScriptResource.axd gives an error on fresh install of ASP.NET Ajax 1.0
Hello,I have a fresh install of Microsoft ASP.NET Ajax 1.0. When I create an Ajax enabled website in Visual Studio, and immediately run the Default.aspx page I get a javascript error: Sys is not
Backflush
I am looking for a report in SAP that would give me a list of all parts that are populated with a backflush code, or not populated with a code. I am aware of looking each part individually, but
Multi image upload
I have a gallery to build and want to build a dynamic upload form to allow for $var number of fields but have a 30 sec execution limit on my host. im looking for advice on how to loop thrue up to 8
Do not allow posting of whitespace
Currently the script below works if the user does not type a name/message, but if i create a whitespace with the spacebar, it will submit. How would I fix this?message page:<?php// Get the