Jump to content

rksprst

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

rksprst's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. 1. Yea, I am getting the values from the database. 2. Yes, the referencing seems fine. I did test it with echo it works fine. 3. The checkboxes show fine. The functionality that I want is that a user displays certain fields that he wants to see (via the checkboxes). These fields are derived from the header row of a table. Once the user selects what fields he wants to see I show him all the data (each row in the table) under each field (column in the table). The problem is that when I try to display this data which depends on the users previous choice (via the checkboxes) it does not work. I always display "Last Name" field even when it's not selected and something else is selected. Looking at the code, this simply doesnt make sense to me. There's no reason it shouldn't work or at the very least be doing what it is doing right now. Maybe there is another efficient way to do this? Sure... $query = 'SELECT * FROM people'; $result = mysql_query($query) or die ('Error in query: $query. ' . mysql_error());
  2. I'm trying to create checkboxes from a database table header row and then pass that to another page. The checkboxes are gotten from the "header" row of the mysql table. I check which of these checkboxes are selected and if it is selected, I display the data for the rest of the rows under that same column which is selected as a checkbox. Here's the code to generate the checkboxes: while($row = mysql_fetch_row($result)) { $first = $row[1]; $last = $row[3]; $id = $row[0]; // 44 is type //echo $id; if($id == 1) { echo "<b>Please select the items you want to display:<br /><br /></b>"; echo "<form action='index.php?selected=$selected&com=com_view' method='post'>"; for($i = 1; $i < 44; $i++) //start at 1, since skipping the ID { echo "<table id='index'>"; $num = 0; echo "<tr><td>"; echo "<input type='checkbox' name='cat[]' value='$row[$i]' />" . $row[$i] . "<br />"; echo "</td><td>"; $i++; echo "<input type='checkbox' name='cat[]' value='$row[$i]' />" . $row[$i] . "<br />"; echo "</td></tr>"; echo "</table>"; } } } And here's the code that displays the data: while($row = mysql_fetch_row($result)) { $first = $row[1]; $last = $row[3]; $id = $row[0]; // 44 is type if($id == 1) { //cat[0] = row[1] $cat = $_POST['cat']; echo "<thead><tr>"; for($i = 1; $i < 44; $i++) { $r = $i + 1; if(isset($cat[$i])) { echo "<th>" . $row[$r] . "</th>"; //echo $row[$r]; } // echo "cat: " . $cat[$i]; } //echo "</tr></thead>"; } } I can't for the life of me figure out why this isn't working. Does anyone know?
  3. Cool, thank you. I'll reduce the number of products on the front page... less rows. And I'll see if I can make the whole button a link as well as putting a border around the shopping basket. Thanks for the comments and suggestions. :)
  4. [quote author=Nightslyr link=topic=112833.msg458180#msg458180 date=1161887985] Access denied. [/quote] Huh? You couldn't access the site? That's weird, I can access it fine... there should be no problems at all. Server is up, dunno why you cant access.
  5. Hm, ok well I've been looking at some tutorials for php and mysql. And I just don't feel like learning a brand new language. So, I'd be willing to pay for someone to do this for me. PM me or post here if you're interested.
  6. So this is an ecommerce site: http://www.shopvilleonline.com/ I'm aware that it does not validate correctly - and am wondering if this is really a big deal? Will I get hurt with search engines? What do you guys think about the color of the site? Should it be changed, and if so - to what color/colors? Any comments are great, be harsh if you want... I can take it. Also, I know ALOT of product images are unavailable, which is something I'm working on fixing and posted a thread here for help.
  7. If you're referring to me copying the image files from a remote server, this is allowed. As I'm copying the files from a distributor with whom I have a contract with. Oh, and I forgot to add. This will all be gotten from a CSV file that has the product_ID and the corrosponding image URL in it.
  8. I am using the shopping cart software, CubeCart. I am wondering what code I would need to access teh database and then to search for a product via its product_ID. Then to copy over the appropriate image from a remote server to my own server, and change a field in the database to reflect the new image for the product. If anyone can give me hints as to how to do this... Thanks :)
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.