Jump to content

ratcateme

Members
  • Posts

    1,216
  • Joined

  • Last visited

    Never

Everything posted by ratcateme

  1. i think you would need the page to refresh javascript can be usefully for that also if you don't want the whole page to refresh you could use ajax to do it Scott.
  2. the is a problem with your code on line 12 can you post say the first 15 lines of your code. you can remove any info like database login info if you want Scott.
  3. looking at your code it dose both of those operations i thought? although your mail line should be re written to: if(mail("$Email","Your Request for login details", "This is in response to your request for login detailst at site_name \n \nLogin ID: $Login \n". $URL. "resetpassword.php?Login=" . urlencode($Login) . "&key=$key\n" ,"$headers")) also $URL is not defined Scott.
  4. you can but you need smtp server program running on it. one is included in the full version on xampp check out the xampp page for more details Scott.
  5. does your ISP provide mail services to you? if so your best bet at the moment is to set that section of you php.ini to ; For Win32 only. ;SMTP = localhost ;smtp_port = 25 ; For Win32 only. ;sendmail_from = [email protected] ; For Unix only. You may supply arguments as well (default: "sendmail -t -i"). sendmail_path = "C:\xampplite\sendmail\sendmail.exe -t" ; Force the addition of the specified parameters to be passed as extra parameters ; to the sendmail binary. These parameters will always replace the value of ; the 5th parameter to mail(), even in safe mode. ;mail.force_extra_parameters = go to C:\xampplite\sendmail\ and edit sendmail.ini so that it looks something like [sendmail] smtp_server=smtp.your.isp.com smtp_port=25 that way your mail will go to your ISP and then hopefully to you Scott.
  6. try running your query like $result2 = mysql_query($sql2) or die(mysql_error()); it should display any errors you are having. Scott.
  7. the way i do it is a generate a MD5 hash with a random number then send a like to my users like resetpass.php?user=username@test=random_md5_hash and store the md5 hash in a database. also the hashes are salted so brute forcing with say md5(rand()) shouldn't easilly result in my hash. Scott.
  8. i see you are running a mail transport program? the current setup requires a mail server listening on port 25. i would advise you to get the full version of xampp as it has a mail transport system that can be used. Scott.
  9. well can you give us some more detail like what system are you using Linux or windows? and the php.ini values for SMTP, smtp_port and sendmail_path please if you dont have access to your php.ini create a simple script like <?php phpinfo(); ?> it will show all the details regarding your PHP configuration. Scott.
  10. i currently use a database system that contains IP's and if a IP fails 5 times in 10 mins then the IP is blocked for 1 hour Scott.
  11. umm if you have a var say $rowcount with the number of items to be displayed you could write the if like if($i%3 == 0 && $i != $rowcount){ Scott.
  12. use the Modulo (%) it will return the remainder of a division equation so 1%3 returns 1 because 1 is the remainder of 1/3 but it will return 0 on 3%3 or 6%3 so you can have a database query script like for($i = 1;$row = mysql_fetch_row($result);$i++){ echo "<td>{$row[1]}</td>"; if($i%3 == 0){ echo "</tr><tr>"; } } Scott.
  13. no it will give you what you call a global IP it is the IP of the remote host it is talking to your pc may have a address like 192.168.1.2 but to get to the internet it has to talk to your router that relabels it with a its own IP that will be something like 118.213.146.69 Scott.
  14. $_SERVER['REMOTE_ADDR'] Scott.
  15. realpath("./a.php"); Scott.
  16. you can make a simple database with one table with say 8 fields (id,album,name,file,genre,date,size,hits) you could add the songs manually although a script would most likely take less time in the long run. although just thinking about scripts and stuff 2 tables might be better one for the tracks and one for the albums. Scott.
  17. your not going to like this advise but if you are planning a music sharing site you need to learn how to use a database. it is a billion times better. it is far easier to add new songs and you can have it generate a things like a most popular list, latest added or a rating system. but i am guessing that would require a total redesign also i would advise steering away from pre-coded scripts they can get very complicated to maintain and update when you want to change something and you have no idea how it works. there a heaps of tutorials for php/mysql check out http://www.tizag.com/ for a good start. and we are always here to help if you get lost Scott.
  18. try foreach($query as $querytablename => $querycom) { mysql_query($querycom, $con) or die('Cannot execute! (' . $querytablename . ' Table)'); echo('Table created! (' . $querytablename . ')<br />'); } also you don't need the ; at the end of your foreach Scott.
  19. well i kind of need something more than what you have given us could you try and simpfly it down and just the line where it is called and the lines where $location_x and $location_y are defined Scott.
  20. <table width="50%" border="0"> <tr> <?php $i = 0; while ($data = mysql_fetch_array($return)) { ?> <?php if($i != 0 && $i % 3 == 0){ echo "</tr> <tr>"; }?> <td> <img width="70" height="70" src="images/<?php echo $data['gamepic']; ?>"><br /> <?php echo $data['gamelink']; ?> </td> <?php $i++; ?> <?php } ?> </tr>
  21. can we see some more like the full function declaration and how you are calling it. Scott.
  22. you need to exit single quotes to include a php var like this echo '<td align="center" width="" bgcolor="#c0c0c0"> <a href="admin.php?form=adduser&order=id">'.$row->username.'</a> </td> <td align="center" width="" bgcolor="#c0c0c0"> <a href="admin.php?form=adduser&order=firstname">'.$row->IP.'</a> </td>'; Scott.
  23. with php you don't even really need to cast it as a int if you just went $random_string + 1 it should work just the same as a normal number defined as $number = 55 Scott.
  24. im not very up with the play on how PHP handles large numbers but php.net/int suggest numbers outside the 32bit range would be changed to a float that has a 64bit range that supports up to around 14 decimal digits. Scott.
  25. like i said specify a range like mt_rand (1*pow(10*12),1*pow(10*13)-1); untested but i think it should work Scott.
×
×
  • 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.