Jump to content

kevinkorb

Members
  • Posts

    52
  • Joined

  • Last visited

    Never

About kevinkorb

  • Birthday 02/17/1982

Contact Methods

  • Website URL
    http://www.kevinkorb.com

Profile Information

  • Gender
    Male
  • Location
    St. Louis, MO

kevinkorb's Achievements

Member

Member (2/5)

0

Reputation

  1. ######################################### ######################################### $file='download/new.txt'; $type='text/plain'; header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: private",false); header("Content-Type: ".$type); header("Content-Disposition: attachment; filename=\"".basename($file)."\";" ); header("Content-Transfer-Encoding: binary"); header("Content-Length: ".filesize($file)); readfile($file);
  2. Just use the full path to the site root, or use the relative path. So if the file is in the same directory as your php script calling it just use read("myFilename.txt"); Or if it's in the parent directory... read("../myFielname.txt"); Get it? If not let me know where your file is in repect to the site root and where your php file is in respect to the server root and I'll tell you what to do.
  3. Actually the mail() not returning an error didn't mean it successfully left your server, it just means the command ran correctly. If there was a problem with the email address, or the mail server the email address was hosted on then you would find those errors in your maillog. If you're on a *nix look at /var/log/mail.log or something similar. The main things about not getting caught as spam is keep very few images, a decent amount of text. As far as testing on an account with anti-spam software, I'm have no good recommendations on that. Sorry.
  4. That's your problem, it's not finding your file at: $file='/path/new.txt'; where is your path pointed to? It is being pointed from the server root and not your site root correct?
  5. Really it depends on how your data relates to each other. However following good database normalization techniques, and proper indexes is typcially the way to go.
  6. What happens when you do this? $file='/path/new.txt'; $type='text/plain'; if(file_exists($file)) { header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: private",false); header("Content-Type: ".$type); header("Content-Disposition: attachment; filename=\"".basename($file)."\";" ); header("Content-Transfer-Encoding: binary"); header("Content-Length: ".filesize($file)); readfile($file); } else { die("FILE $file does not exist"); }
  7. Try this: $result =mysql_query("UPDATE user_name SET active = 'yes' WHERE iamlink = '$accode' AND username = '$un' AND email = '$em' ") or die(mysql_error());
  8. Your select doesn't check the username though....
  9. It is saying that it's not updating your rows. Check your user_name table to make sure that it has those values. SELECT * FROM user_name WHERE iamlink = '37e48acbb43dda0568b8867381227f12' AND username = 'testusername' AND email = 'testemail' When you run this, do you get any rows back?
  10. Another thing you need to look out for is escaping your data. Since you're getting data from the user $_GET etc. Escape that using... $accode = mysql_real_escape_data($_GET['code']); $em = mysql_real_escape_data($_GET['email']); $un = mysql_real_escape_data($_GET['username']); Then they can't use 'SQL Injection'
  11. Try this and see if it helps you out. <code> <?php // Grab url get $accode = $_GET['code']; $em = $_GET['email']; $un = $_GET['username']; //CONNECTION include('../always/comms/data.php'); mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to database'); $dbname = 'iam_user'; mysql_select_db($dbname); $query = "SELECT * FROM activation WHERE ac = '$accode' AND email = '$em' "; $loginres = mysql_query($query); $numrows = mysql_num_rows($loginres); if ($numrows > 0) { $result =mysql_query("UPDATE user_name SET active = 'yes' WHERE iamlink = '$accode' AND username = '$un' AND email = '$em' "); echo mysql_affected_rows($result)." Affected rows for $accode - $un - $em"; $result = mysql_query("UPDATE activtion SET activated = 'yes' WHERE ac = '$accode' AND email = '$em'"); echo mysql_affected_rows($result)." Affected rows for Activation $accode - $em"; //header('Location:../registration/?reg=choose'); } else { //header('Location:../registration/?reg=wrongcode'); } ?> </code>
  12. Also look at your mail logs, it will help you see if your sendmail failed on sending email messages. Another thing you can do is just test your messages to different mail servers that run anti-spam software. Most of the servers that detect the spam will add that data and the spam score to the emails and then you can see why they thought it was spam.
  13. Clarify a little more what you expect to happen, and what is happening in more detail. Thanks.
  14. TRUNCATE TABLE 'tablename' That will clear all data and reset your auto_increment value.
  15. Change Your Updates to Selects to make sure that you're getting rows to update. That should then be able to figure out where your problem lies.
×
×
  • 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.