Jump to content

steve448

Members
  • Posts

    55
  • Joined

  • Last visited

    Never

Everything posted by steve448

  1. Where have you previously set $check_cookie to 1? Your cookie will not be visible until the next page so you can't use if($_COOKIE['auth'] != "") on the same page it was set.
  2. Assuming the site is being indexed by Google just search for your search term followed by site:www.example.com Google Advanced Search
  3. use if / ifelse statements so it only executes the header you want. Something like: <?php if(($r['username'] == $username) || ($r['email'] == $email)) { header("Location: " . $site_url . "index.php?p=register&e=1"); } elseif(($name == "") || ($dname == "") || ($username == "") || ($password == "") || ($email == "")) { header("Location: " . $site_url . "index.php?p=register&e=2"); } else { mysql_query("INSERT INTO `pcp_users` (username,password,email,display,name,description,age,dob,country,location,interest,website,aim,msn,icq,yim,games) VALUES ('$username','$password','$email','$dname','$name','$info','$age','$dob','$country','$location','$interests','$website','$aim','$msn','$icq','$yim','$games')") or die (mysql_error()); header("Location: " . $site_url . "index.php?p=login&e=4"); } ?>
  4. Make sure that you put an email address in the From field which relates to your server. Other than that there is not much you can do, if there was an easy way to stop it going in the spam bin then people who send spam would do it. I always make a very clear notice after a member has registered telling them to check their junk mail if they do not get the welcome email and to add my company email address to their safe list.
  5. By adding the bcc to the headers There are plenty of examples on php.net
  6. Ok, think this is going to have to be my last attempt because if this doesn't work then I'm lost! But first check that you do have 2 columns in your database and they are called exactly url_id and keyword <?php $numwords = count($words); for($i=0; $i < $numwords; $i++) { $keyword = $words[$i]; $this->_db->query("INSERT INTO keywords (url_id, keyword) VALUES ('$url_id', '$keyword')"); } ?>
  7. Are you still getting any error because you don't currently have the insert in your script? <?php $values = "('$url_id', '$words[0]')"; $numwords = count($words); for($i=1; $i < $numwords; $i++) { $values .= ", ('$url_id', '$words[$i]')"; } //Is this part still in your script? $this->_db->query("INSERT INTO keywords (url_id, keyword) VALUES $values"); ?> [code] [/code]
  8. Change: <?php $values = "($url_id, '$words[0]')"; ?> To: <?php $values = "('$url_id', '$words[0]')"; ?> Missed of the quotes for the $url_id at the beginning of $values
  9. Post your entire code as you have it now so I can see where we're up to
  10. Sorry, scrap my last post then, I'm an idiot! This should work <?php $values = "($url_id, '$words[0]')"; $numwords = count($words); for($i=1; $i < $numwords; $i++) { $values .= ", ('$url_id', '$words[$i]')"; } $this->_db->query("INSERT INTO keywords VALUES $values"); ?> Need to have the quotes around $url_id
  11. You don't need to. When you are going through your validation checks in your script, if it fails at any point just get rid of the file then. I.e. <?php if(!$Valid) { unlink($file_name); } ?>
  12. You are trying to put 8 values into 2 fields of your database. I think for what you are trying to do you are going to need to do do more than one insert query. So if you change this: <?php $numwords = count($words); for($i=1; $i < $numwords; $i++) { $values .= ", ($url_id, '$words[$i]')"; } $this->_db->query("INSERT INTO keywords VALUES $values"); ?> To something like: <?php $numwords = count($words); for($i=1; $i < $numwords; $i++) { $keyword = $words[$i]; $this->_db->query("INSERT INTO keywords (url_id, keyword) VALUES ('$url_id', '$keyword')"); } ?> That is assuming that you want the url_id to always be the same, which it is at the moment. Are you sure that url_id is not an auto_increment field? Then you would want: <?php $numwords = count($words); for($i=1; $i < $numwords; $i++) { $keyword = $words[$i]; $this->_db->query("INSERT INTO keywords (keyword) VALUES ('$keyword')"); } ?>
  13. The other thing you can do is remove the @ from the mail function. This is suppressing the error, but if you have an error you want to know what it is so you can fix it.
  14. If you echo out $values before the insert then you should see your problem. Your insert statement should be in this format: <?php $sql = "INSERT INTO keywords (url_id, keyword) VALUES ('$url_id', '$keyword')"; ?> When you are building your $values string it is all jumbled up.
  15. If you want to get the contents of a protected page then you would need to give your script the login details of the page, otherwise it is going to see the same thing if you visited the site with your browser, the login page.
  16. No. If you want to hide who is receiving the email then you can't because obviously the person receiving it knows what their email address is and if you don't tell it where to go it can't get there. If you want to send the email to more than one person but don't want the recipients to know who else has received it then you can use BCC If you want to make it so when someone forwards your message it removes the original recipients email address then I would assume that this is down to the mail client of the person forwarding the email, I doubt that you can control this part because it is no longer you sending the email. (Someone feel free to say otherwise if this is not correct). There may be an instruction you can put in the headers for this but I have never heard of it, and it would only be an instruction anyway, the recipients mail client may do as it likes anyway. You can hide who is sending the message by putting whatever you like in the FROM header, but the chances are it will just go straight to the SPAM folder if the FROM field does not relate to the server sending the email.
  17. ehm.. what? thanks for giving me a useless reply, now nobody will help because it has replies... Was just reading this and thought having never used shuffle() before that I couldn't see why it doesn't work. So I followed darkfreaks link, and the answer is there for you. Although I did have to scroll down the page to the user notes to find it. Hint:
  18. Not certain but should: $date = date("Y-d-m G:i:s"); Be: $date = date("Y-m-d G:i:s");
  19. Sorry didn't even read your code, thought you just wanted to know how to do the image verification. Looks like you've already done what you need. You just need to replace echo '<img src="verify.png" alt="Type this into the box" title="Type this into the box" /> With a call to your verificationImage() function. Also, don't forget to set the session inside that function, otherwise its always going to fail.
  20. The break in the link to your image is probably to do with the space in the filename, best to urlencode it, or not use spaces in your file names. Sending html emails can be a right pain, mainly because you are at the mercy of whichever email company happens to be displaying the message, some allow some things, some don't. Are you including your logo in a html tag? I.e. <img src="your_logo_file" alt="put_something_here" /> Is it just displaying the raw html or nothing? Are you sure your email account will display html? It is usually better to send a multipart message, which contains both a html and a plain text version, since your users will be using all different mail clients.
  21. This: <?php $this->_db->query("INSERT INTO urls SET url = '$url'"); ?> Should be something like: <?php $this->_db->query("INSERT INTO urls (url) VALUES ('$url')"); ?>
  22. If you want to display an image in an email then you will need to send it as html. Which means you have to include the content-type header so the receivers mail client knows that it contains html. Something like: <?php $header .= "MIME-Version: 1.0\r\n" . "Content-Type: text/html; charset=\"iso-8859-1\"\r\n" . "Content-Transfer-Encoding: 7bit\r\n"; ?> And then use the html image tag
  23. Thats great, so the thanks I get for helping you is SPAM in my message box. Must help you again sometime!
  24. No need to send me anything. Just mark the topic as solved!
×
×
  • 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.