Jump to content

lvtrii

Members
  • Posts

    22
  • Joined

  • Last visited

    Never

Contact Methods

  • Website URL
    http://lvtrii.co.uk

Profile Information

  • Gender
    Not Telling

lvtrii's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Use clear:both; in the footer to force a new line
  2. $res = mysql_query("DESCRIBE table"); while ($row = mysql_fetch_assoc($res)){ $fields[] = $row['Field']; // Do whatever here.. I'm just sticking the name in an array }
  3. make sure .bash_aliases is uncommented in .bash_rc in your home directory, then open it up in your favourite editor, and add this line: alias myphp='php /path/to/script.php' Then log off, and log back on. All you have to do to launch your script now is type myphp and press enter
  4. Unfortunately, there isn't. You can however do this: <?php // Check if logged in if (($userDate['user'] == $user) && ($userData['password'] == $pass)){ ?> HTML HERE, Without echo etc. <?php } ?>
  5. while ($row = mysql_fetch_row($res)) { $new[0] += $row['count']; } Try that.. I'm convinced it's the fact you're trying to use the date field as a key that it doesn't like.
  6. $theItems = explode(":",$newstring); $strBasket = ''; while ($i < count($theItems)) { $strBasket .= 'Item:'. $theItems[$i].'<br />'; ++$i; $strBasket .= 'Quantity:'. $theItems[$i].'<br />'; ++$i; $iQuantity = $theItems[$i]; $strBasket .= 'Price (-tax):'. number_format($theItems[$i]/1.175,2).'<br />'; ++$i; $strBasket .= 'Tax:'. number_format($theItems[$i]*7/47,2).'<br />'; ++$i; $strBasket .= 'Full Price:'. number_format($theItems[$i],2).'<br />'; ++$i; $fPrice = $theItems[$i]; $strBasket .= 'Row Total:'. number_format($fPrice*$iQuantity,2).'<br />'; ++$i; } Assuming $newstring is the string of items
  7. Change <form action="loginCheck.php"> To <form action="loginCheck.php" method="post"> And it should work
  8. Offset error, database handler... gut instinct is telling me it's this line: while (list($k, $count) = mysql_fetch_row($res)) { $new[$k] += $count;[b] <-- HERE[/b] } Try using: while ($row = mysql_fetch_row($res)) { $new[$row['theDate']] += $row['count']; } And in the SELECT query, change the fields to: DATE_FORMAT(stamp, '%m-%d%') as theDate, `count`
  9. The way you're running your queries, if the username and password are both empty, then it will still get to the point where it sets the cookies, as $user and $userData['user'] will both be empty. As will the passwords.
  10. That is strange... Try using: setcookie('user', $userData['user'], time()+3600); setcookie('password', md5($userData['password']), time()+3600); And can I also see login.html too? Are your input names correct? e.g. <input type="text" name="user" /> <input type="password" name="password" /> And is the form definitely using POST?
  11. jkewlo: Windows is built around explorer.exe - Internet Explorer inherits a lot from explorer, and adds it's own. You got the dependency the wrong way round. (Plus, people can always install another windows shell if they feel like it. None of those will be dependent on IE. I was more thinking of Windows Updates, and the like)
  12. It'd spit out it's dummy and say that it can't tell which you want; Try using: select username, image, ranks.rName, members.ID as memID, timestamp, aim, categories.ID as catID, categories.name from members, ranks, ranklookup, categories where members.rank = ranks.id and ranks.id = ranklookup.rid and categories.id = ranklookup.cid and categories.id = ' . $cid . ' and disabled = 0 ORDER BY ranks.ID desc; then use $row['catID'] and $row['memID'] as required
  13. Can you post the code of the page where you set the cookies?
  14. Firstly, it's Javascript. Make sure to get Java out of your head or you'll get quite confused when using google.. As for the simplest way to detect a user's screen resolution and post it back to a server using javascript: var sWidth = screen.width; var sHeight = screen.height; var xmlhttp=false; /* Try IE */ try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp = false; } } /* Try firefox */ if (!xmlhttp) { try { xmlhttp = new XMLHttpRequest(); } catch (e) { xmlhttp=false; } } if (!xmlhttp && window.createRequest) { try { xmlhttp = window.createRequest(); } catch (e) { xmlhttp=false; } } if (xmlhttp){ var data = "w=" + sWidth + "&h=" + sHeight; xmlhttp.open("POST", "page-on-server.php", true); xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xmlhttp.send(data); } Personally, I use jQuery for all my javascript now. It's so much nicer than using the original code.
  15. He's kind of right. There's a lot of core windows components that won't work any more if you uninstall IE
×
×
  • 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.