Jump to content

RLAArtistry

Members
  • Posts

    31
  • Joined

  • Last visited

About RLAArtistry

  • Birthday 03/16/1975

Contact Methods

  • Website URL
    http://rlaartistry.com

Profile Information

  • Gender
    Male
  • Location
    Texas/Florida/Oklahoma/Jamaica

RLAArtistry's Achievements

Newbie

Newbie (1/5)

1

Reputation

  1. Ignace- love the site. Ninjakreborn- I too like the logo you are leaning towards. Without the laptop #3 looks unbalance and #4 too vertical and #5-6 is retro. For the home page, the section under the header I would make it fill the screen (more awesome if the text where actual links). Use Ignace's suggestion to showcase projects and do away with the scroll.
  2. Ads are a great way to generate income on your site, but there's a time and place for everything. I would suggest removing the banner from your home page or placing it at the bottom. Sell your site, not someone else's. People read from left to right, top to bottom. Therefore, put your most important content at the top and work from there. Borders makes your page look confined. To create the illusion that your page is bigger, remove the border. Most websites today are going for a full page look (better use of cyber real estate). I like the background. After removing the borders, put some space between the boxes and add a shadow (this will create the illusion the boxes are floating). Fix the header (css: position:fixed) and add the navigation (not enough links to have its own row). Thats my $0.02, good luck.
  3. I am not sure what happened to my coding. I did noticed however, that I didn't get the usual popup when I clicked on the code icon, just got the tags, figured it was because I was using a tablet. The code you posted worked perfectly, you are a genius Christian F., but I have 1 question. I like to get an understanding of a code so I can figure the thought process behind it. Why did you use "intval"? The code seem to work without it.
  4. Thank you Christian F. but I've already read up on it and realized it wasnt recommended. Therefore I had a change of plans and came up with this bit of code. $currentproduct = $_GET[[color="#800000"]'pid'[/color]]; $_SESSION[[color="#800000"]'productID'[/color]][] = $currentproduct; [color="#00008b"]foreach[/color]($_SESSION[[color="#800000"][color="#800000"]'productID'[/color][/color]] [color="#00008b"]as[/color] $key=>$value) { [indent=1]echo [color="#800000"]'The value of $_SESSION['[/color].[color="#800000"]"'"[/color].$key.[color="#800000"]"'"[/color].[color="#800000"]'] is '[/color].[color="#800000"]"'"[/color].$value.[color="#800000"]"'"[/color].[color="#800000"]' <br />'[/color]; } [/indent] This code save my product viewed in an array. Now I need help with a code that will check the array to see if the current pid exist, if it does or if it is greater than 1 then it wont update the views counter. I tried array_count_value to see if the value exist greater than 1, but keep getting an error. Basically I need a code that will check the array and if the the current product pid exist it will update or not update the views. Can someone please help me. Thanks in advance
  5. I totally get what you guys are saying but I only need the views. The views I will store in a database. What I don't need is the session id, ip or anything else. Now, I am not that knowledgeable about the push array method. Can anyone help me with that?
  6. That is true akphidelt2007 but i didnt want to do another sql query for this. Seem a little extreme for such a small task.
  7. Let me see if I understood you correctly. 1. Create like a session array 2. Store viewed products ID in that array 3. when someone click on a product, the script will check if the current product id is already in the array 4. If not add 1 to the database. Is that what you're suggesting?
  8. Hey guys, its me again. I want to add a counter for every time a product is viewed (this counter is stored in the same database table as the product itself). That way I can generate a most viewed product list. I added this bit of code UPDATE products SET viewCount=viewCount+1 WHERE pid='$pid The problem is, every time the page refresh the counter adds 1, how can I make it add 1 per session without having to save the session id to my database? Thank you, any suggestion will be appreciated.
  9. This works fine. If both images have the same width and height the the top and the left should be "0". { position: absolute; z-index: 2; top: 0; left: 0;} Are you trying to do a CSS rollover image?
  10. Once again thank you guys very much for your help. I combined the suggestions of Zane and Requinix to come up with a solution. As I mentioned before I considered using a table but could not figure out how to set the condition that indicates that the record is before the current one. Zane's code gave me the idea to use the "<" and ">" to get the next and previous record. Here is the code: ///////////////////////// NEXT QUERY /////////////////////////////////////// $nextbtn = ""; $prevbtn = ""; $next = ""; $prev = ""; $browse = "SELECT * FROM products WHERE pro_name>'$pro_name' ORDER BY pro_name ASC LIMIT 1"; $browse_query = mysqli_query($Connection, $browse) or die (mysqli_error()); $result = mysqli_num_rows($browse_query); // count the output amount if ($result == 1) { while($row = mysqli_fetch_array($browse_query)){ $pro_name = $row["pro_name"]; $pro_id = $row["id"]; } $nextbtn = "NEXT"; }else{ $nextbtn = ""; } $next = "inventory_edit.php?pid=$pro_id"; /////////////////////////// PREVIOUS QUERY //////////////////////////////// $browse = "SELECT * FROM products WHERE pro_name<'$pro_name' ORDER BY pro_name DESC LIMIT 1"; $browse_query = mysqli_query($Connection, $browse) or die (mysqli_error()); $result = mysqli_num_rows($browse_query); // count the output amount if ($result == 1) { while($row = mysqli_fetch_array($browse_query)){ $pro_name = $row["pro_name"]; $pro_id = $row["id"]; } $prevbtn = "PREVIOUS"; }else{ $prevbtn = ""; } $prev = "inventory_edit.php?pid=$pro_id"; Currently this works and even if I delete an item from the inventory it goes on to the next or previous one. The next/previous links appears and disappears when the results from the query = 0 or 1. If anyone have any other suggestions or modifications please do share, otherwise this post is "SOLVED". Thank you
  11. Thanks for your replies. Apparently I didn't search hard enough. Here I thought I made a break-through in php coding. The thought did came to mind if an item was deleted from the database then that would throw off the sequence. I did also thought about using another table but could not come up with something to do this = "some condition indicating the record is before the current one".
  12. Hey guys and gals, it me again. I need help with my php coding. OBJECTIVE I have a form that will allow me to edit products in my inventory. I want to add a next and a prev link to browse the inventory. When the last item in the inventory is reached the next link disappears and visa versa. So far I query the database if (isset($_GET['pid'])) {// the id for the product to be edited is passed via URL $thisID = $_GET['pid']; $sql = "SELECT * FROM products WHERE id='$thisID' LIMIT 1"; $query = mysqli_query($Connection, $sql) or die (mysqli_error()); $productCount = mysqli_num_rows($query); // count the output amount if ($productCount == 1) { while($row = mysqli_fetch_array($query)){ $pid = $row["id"]; $name = $row["name"]; $price = $row["price"]; $desc = $row["desc"]; $cat = $row["cat"]; $subcat = $row["subcat"]; } } else { echo "There was an error processing your request"; exit(); } } The above I am good with... It renders the information of the product to be edited in the form and I have another bit of code that UPDATES the database. Now I just need help on the next and previous link to browse the database. I came up with this lame bit.. <a href="?pid=<?php echo ++$pid; ?>">Next</a> <a href="?pid=<?php echo --$targetID; ?>">Prev</a> I don't think "--$targetID" is even legal. I search php.net and haven't seen anything remotely looking like it, but strange enough it allows me to decrease "$pid" value. Any idea will be appreciated. Thanks in advance.
  13. Is it possible for you to post a picture of the layout you want? From what I get from the CSS and the HTML code you want contents in the div with header class to be inline, therefore you have to float logo, middle, slogo, search and map class to the left. float: left; Try and avoid using AP div, use normal divs, and use margins and floats for positioning.
×
×
  • 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.