Jump to content

Philip

Staff Alumni
  • Posts

    4,665
  • Joined

  • Last visited

  • Days Won

    20

Everything posted by Philip

  1. Well, I'll look at it this way: On my site, out of the 1.3mil hits in the past month from IE users alone, 37% are still IE 6.0 I'd say that's still a big market.
  2. There will be a button on the bottom left (under all the posts) that says "Topic Solved" I thought they moved it to the top right, but I guess not.
  3. change this line: $error = (in_array($_POST['serialNumber'], $serialNumbers))? null : 'A valid Product Serail Number Required!'; to: $error = (in_array($_POST['serialNumber'], $serialNumbers) && !empty($_POST['serialNumber']))? null : 'A valid Product Serail Number Required!'; (Added the !empty to make sure the field was at least filled in)
  4. Take a look at: http://www.lynnarts.org/about_us/admin/includes/bbcode.js I think you'll see the problem why (404)
  5. Agreed, especially for those who got Ultimate, and got screwed basically.
  6. I finally downloaded it a few nights ago, haven't had a chance to actually install it on my spare hdd. I'll admit it, vista actually grew on me and I'm kinda looking forward to the final Windows 7... I'm probably going to take back that statement in the not too distant future.
  7. Change: if (!$result = mysql_query("SELECT * FROM RayMusicCategories WHERE PARENT=0")) { echo "Database is down"; } to: $result = mysql_query("SELECT * FROM RayMusicCategories WHERE PARENT=0") or die(mysql_error());
  8. Make sure to use == instead of = in conditional statements. = set's the value, == compares it
  9. In order for wamp to process it, it must be in the www folder. You are able to specify where it is in one of the settings, but it's been so long since I've had to change that, I'd recommend just googling it.
  10. <?php // get the URL variable $pageVar = $_GET['page']; // create an array of acceptable pages the user can load: $acceptable = array('main', 'about', 'news', 'contact'); // let's check to see if the variable in the url is in the array or not: if(!empty($pageVar) && in_array($pageVar, $acceptable)) { // load the page } else { // that page is invalid! // we can show an error page, or redirect the to the // default page } ?> I'm not sure how you want to include the pages, but that's the basic syntax
  11. Okay, we're going to use GET variables, which are the ones in the url. So, if I visit foo.com/bar.php?var=value, I can do the following: <?php echo $_GET['var']; // this will show "value" ?> So, in your case we can do a few things... a switch statement or use arrays I'd recommend going with arrays, as it's the easiest to update.... let me get you some code real quick. If you have access to the server, play around with trying the code above
  12. Separate your mysql_fetch's and queries, and run or die(mysql_error()); on each of the queries: Example, your check username: $checkUsername = mysql_num_rows(mysql_query("SELECT `id` FROM `users` WHERE `username`='".$username."' LIMIT 1")); Change to: $checkUsernameQ = mysql_query("SELECT `id` FROM `users` WHERE `username`='".$username."' LIMIT 1") or die(mysql_error()); $checkUsername = mysql_num_rows($checkUsernameQ);
  13. Make sure you are visiting the page via a browser & http://localhost/ - and not just trying to open the page by double clicking the file.
  14. Well, that was just an example. Post your code that you're using now, and 'll try my best to explain how to integrate it & possibly improve your current code.
  15. Looking earlier on your form, I saw the captcha but didn't have time to reply. What I think is happening, is every time you submit the form you are calling to create a new security image, thus creating a new security code & making the one the user saw invalid: $securimage = new Securimage(); When you read through this tutorial, you might understand it better (notice the session key vs post value?): http://www.codewalkers.com/c/a/Miscellaneous/Creating-a-CAPTCHA-with-PHP/
  16. So, it won't show the link? echo $_SESSION['message'].' <a href="logout.php">Log out</a>'; is correct. Would display:
  17. Ding ding ding! We have a winner!
  18. if(!$_GET['page']) $pageToInclude = 'news.html';
  19. See my above post. I just noticed you're missing a semicolon on the $connect line. Anyways, you need to move the connect statement above the query statement, and add in the or die() part. It'll tell you all the errors when try to run the query. -- Your new post, change: mysql_fetch_array (db.mySQL,$result, MYSQL_BOTH) to mysql_fetch_array($result) Look at parameters you should pass to the function, you won't need "db.mySQL"
  20. Please use the code tags next time Why do you have $connect = mysql_connect('host', '*****', '*****') or die(mysql_error()) // ERROR BELOW, because of look at line above... while ($row = mysql_fetch_array(db.mySQL,$result, MYSQL_BOTH)) Then, at the top: <?php include('dblogin.php'); ?> <?php $mysql="SELECT * FROM products"; $result=mysql_query($mysql); Connecting AFTER you try to run the query? Also, for future debugging its easier to have an 'or die(mysql_error())' statement on the end. $result=mysql_query($mysql) or die(mysql_error()); (removed your user/pass in connect statement)
  21. That's handy, thanks! Typically I can get all versions of IE to look the same (except for png transparencies) - but this is a great tool Probably best in misc. talk though - IMO.
  22. Are you sure?? The query is executed on the next line! The semicolon is OK, but not needed in this case. There are better ways (IMO) of running multiple queries, but this is getting offtopic.
  23. Are you wanting to search the whole database, and not just one table?
  24. I think you're about to get 50 different answers, lol Web host list, another topic about this very thing. Personally, I do site5. Never had a problem
  25. Well, it really depends on your hosting. What do you have? (if you have a cPanel backend, take a look here - it's pretty basic)
×
×
  • 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.