Jump to content

peranha

Members
  • Posts

    878
  • Joined

  • Last visited

Everything posted by peranha

  1. Thanks, Downloaded the 5.2.5 zip file as my old one didnt come with the files and added them.
  2. Where can I get the library, and instructions to install it. I have not worked with this before, and searched the web. Everywhere i go, it says to uncomment the php_gd2.dll line in my PHP.ini file. There is no line in my ini file. I am using PHP5. Thanks in advance.
  3. mysql_query("INSERT INTO members (id, username, password) VALUES (NULL, '$user', '$pw')") or die('For some reason, we could not process your registration.'); This should be your query line mysql_query("INSERT INTO members (id, username, password) VALUES (NULL, '$name', '$pw')") or die('For some reason, we could not process your registration.'); You are setting the username to $name, not $user
  4. If he wanted to learn he WOULD HAVE READ IN THE TUTORIAL the first time. But you point is good.
  5. Nice, you can listen to a 26 minute tutorial, or change 1 word in you current file. I would choose 1 word.
  6. The writer put it in there so you run into problems when you just copy and paste code to use it.
  7. It is in there so they dont copy and paste, they read the actual tutorial and are trying to learn PHP, not just copying off of everybody else.
  8. Here is the line you missed on the tutorial as well Oh, and if you spot an error in the code, hit me up on the forums with a personal message. Oh, and set $lock from 'true' to 'false'.
  9. Edit, Go TO, enter line number, it may not be always right though, depending on in wordwrap is on or not
  10. Thanks, Completely missed that.
  11. Yes I am, I echo them out on the page, and they are there, yes i do escape them as well
  12. // create query $query1 = "UPDATE " . $pre . "users SET password='$passwordHash' WHERE uniqueid = '$_SESSION[uniqueid]'"; // execute query $result = mysql_query($query) or die ("Error in query: $query. ".mysql_error()); I cannot see anything wrong with this, but when run, it will not update the database.
  13. Yes, you should always add something to the password before storing it in the database. Look at implementing a salt to the password. $salt = anything $passwrdhash = $password.$salt Something like this is more affective.
  14. I am running apache 2.2.3, PHP 5 and mysql 5 for a year now, and have not had any problems. I never read any thing about issues with the versions.
  15. Look for document root and change it to the folder you want ex DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"
  16. I was woundering which RAID is the best for a web, app, file, etc server. I know a little about RAID, but not enough. If you have any suggestion, if you would let me know. Thanks Here are the specs for the MB http://www.gigabyte.co.nz/Products/Motherboard/Products_Spec.aspx?ClassValue=Motherboard&ProductID=2521&ProductName=GA-945GCMX-S2
  17. All firefox versions are messed up. Is there an image, it doesnt show up if there is. It says waiting on image.
  18. <?php $query="UPDATE `".$pre."` adveruse SET `advcount`=advcountadd+1 WHERE `advname` = '$advname'"; ?> Should be this instead. <?php $query="UPDATE `".$pre." adveruse` SET `advcount`=advcountadd+1 WHERE `advname` = '$advname'"; ?>
  19. No, it comes with table does not exist with your code.
  20. For some reason it only executes the queryadd part of the form, and doesnt go past that, any suggestions?
  21. I have a table with 3 fields in it id, advname, advcount. The id is autoincrement, the advname is taken from the website, and the advcount is also taken. When I run my script instead of adding to the the count, it inserts a new row with the number 1 in it. <?php //open connection $connection = mysql_connect($server, $user, $pass) or die ("Unable to connect!"); //select database mysql_select_db($db) or die ("Unable to select database!"); // create query $query = "SELECT * FROM " . $pre . "adver WHERE advuse = '1' ORDER BY rand() LIMIT 1"; // get results of query above $result = mysql_fetch_array(mysql_query($query)); $advadd = $result['advadd']; $advurl = $result['advurl']; $advname = $result['advname']; echo "<a href='".$advurl."'>" . $advadd . "</a>"; // close connection mysql_close($connection); ?> <?php //open connection $connection = mysql_connect($server, $user, $pass) or die ("Unable to connect!"); //select database mysql_select_db($db) or die ("Unable to select database!"); // create query $query = "SELECT * FROM " . $pre . "adveruse WHERE advname = '$advname'"; // get results of query above $result = mysql_fetch_array(mysql_query($query)); if (mysql_num_rows($result) < 1 ) { //add advertisement to database for counting $queryadd = "INSERT INTO " . $pre . "adveruse (advname, advcount) VALUES ('$advname', '1')"; //add advertisement to database for counting $resultadd = mysql_query($queryadd) or die ("Error in query: $queryadd. ".mysql_error()); } else { // Enter count into a variable $advcount = $result['advcount']; //add 1 to the count $advcountadd = $advcount[0]++; // create query $query = "UPDATE " . $pre . "adveruse SET advcount='$advcountadd' WHERE advname = '$advname'"; // execute query $result = mysql_query($query) or die ("Error in query: $query. ".mysql_error()); } // close connection mysql_close($connection1); ?>
×
×
  • 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.