Jump to content

GingerRobot

Staff Alumni
  • Posts

    4,082
  • Joined

  • Last visited

Everything posted by GingerRobot

  1. The problem is that ranks imply knowledge. A post count isn't necessarily a great indicator of that since all the posts could be made up of the person asking questions themselves or giving incorrect/unhelpful answers.
  2. Really depends on how you want it to work. If you just wanted to run the users commands, you could use the eval() function on the string. If you wanted to save it for later, you could use fwrite() Running user's commands is a very dangerous thing to do, however. Perphaps if you told us a bit more about what you're trying to achieve, we could help more.
  3. Well, you could use some javascript to submit the form once the page has loaded, but that seems a bit stupid. You need to address this with the section of code which is executed when the form has been submitted - basically remove the check to see if the form has been submitted, then instead to taking the values from the forms, define them with the values you want.
  4. The reason that the records are only displayed for one of the codes is that the only thing that occurs in the first loop is the setting of the variable. Each time the loop runs, that variable gets overwritten, so when the next query is made only the last value for the code is used. However, you dont need two queries anyway, you can just use a join. Something like this should work: <?php $sql = "SELECT table1.accountcode,table2.id,table2.date_created FROM table1,table2 WHERE table1.accountcode=table2.accountcode AND table1.uid='$row_uid' AND tech='gtalk'"; $result = mysql_query($sql) or die(mysql_error()); while(list($code,$id,$date) = mysql_fetch_row($result){ echo '<tr><td>'.$id.'</td><td>'.$code.'</td><td>'.$date.'</td></tr>'."\n"; } ?>
  5. Yes, it is possible to change some of the settings with the ini_set() function, but not all of them. For example, the upload_max_filesize cannot be altered with the function (for a list of what can and what cannot, see here) Also, i wouldn't be surprised to find that your host has prevented you changing these settings anyway to prevent someone using excessive system resources. It might be worth contacting your host too.
  6. Well, there's no parse errors in the code i've provided and if there's an error with the mysql, then that should be echoed. Perhaps there's something else in the script causing the problem? Try adding these two lines to the top of your file: error_reporting(E_ALL); ini_set('display_errors','On'); And see if there is now an error shown.
  7. Before you finalise that, however, you might wish to consider adding a salt to your passwords to increase the security of the hash (i.e. prevent the use of rainbow tables). Basically, you add a string before/after/in the middle or a combination to the user's password before it is hashed. This makes a reverse lookup chart useless.
  8. Well, actually its impossible to convert back, since it's not an encryption, but rather a hash. Yes, you can (sometimes) gain the original text through the use of rainbow tables, but that's not quite the same thing.
  9. Wouldn't it be easier to just run the query: UPDATE `members` SET `password`=md5(`password`) Again, as wildteen has emphasized, make sure you back up your data and run this query only once.
  10. Try echoing the query in question. Check exactly what is being executed.
  11. Re-reading your post, i think what you're after is something like: <?php $types = array('Other','Head','Neck','Shoulder','Shirt');//define the types - the key of the array refers to the type number $sql = "SELECT type,entry FROM items ORDER BY type ASC"; $result = mysql_query($sql) or die(mysql_error()); $prev_type = ''; while(list($type,$entry) = mysql_fetch_row($sql)){ if($type != $prev_type){ echo $types[$type].'<br />'; $prev_type = $type; } echo $entry.'<br />'; } ?>
  12. Well there you are then, you're missing a quote: $add = "INSERT INTO `users` VALUES ('', '$username', '$md5pass', '$email', '$ip', '$signup', '$type', $payout')"; Should be: $add = "INSERT INTO `users` VALUES ('', '$username', '$md5pass', '$email', '$ip', '$signup', '$type', '$payout')";
  13. 1.) Try adding an or die statement to your query whenever you're having query troubles: mysql_query($add) or die(mysql_error().'<br />Query was:'.$add); 2.) You're not using the md5() function to the password on the registration page, but you are on the registration page - therefore, the passwords will never match.
  14. As far as I can see, $_POST['id'] isn't set by your form, so your update statement wont find any rows to match.
  15. Yeah, you'll need to echo out the curl_error to check for errors. Also, this line: curl_setopt($ch, CURLOPT_URL, $URL); Should be: curl_setopt($ch, CURLOPT_URL, $url);
  16. Call me old fashioned, but you could always try the manual: cURL sockets Now, i'm unsure if the setting allow_url_fopen needs to be on for the use of cURL/sockets (it appears to be off with your host) but either way i wouldn't be surprised if you can't use these either. You might wish to contact your host and find out if the above setting can be changed.
  17. Well, the query is a straightfroward join: SELECT p.Firstname,p.Lastname,p.Email,p.Phone,m.meaning FROM phoneList as p,meaning as m WHERE m.Lastname=p.Lastname You'll then have to modify your output to show the new data as well. On a side note, you ought to be using mysq_real_escape_string() on your firstname and lastname fields to protect against mysql injection.
  18. While you can store an array in a database by serializing the data, 99% of the time that you could consider using an array you want another table.
  19. You can find lists of them ready-made for you: http://www.guavastudios.com/country-list.htm
  20. It should be. You should have a separate table for the items(indeed, a separate table for potential items and a table for items that users have) Without storing the item type in the database, you would have a situation where you have a whole stack of if/switch statements to work out what the item is. You would then have to do that each time you wanted to find the item. Then, what happens when you wish to add an extra item? You probably want something like this: table name: item_types id (auto increment field) type table name: items: id(auto increment field) type_id(link with item_types.id name //i would assume other fields such as power, defence etc table name: user_items id(auto increment field) user_id (link with users.id) item_id (link with items.id) You'll then be in a situation to join your tables in yoru queries to extract the relevant information.
  21. D'you not think you would be better off contacting dell for these questions?
  22. Well, the value is in bytes. The value you've set is exactly 4mbs, so you might want to increase it a bit.
  23. If you want someone to do this for you, head over to the freelance section. This forum is for helping you with something you're trying to do yourself. If you want to have a go yourself, then see the manual for an introduction.
×
×
  • 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.