Jump to content

steve448

Members
  • Posts

    55
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

steve448's Achievements

Newbie

Newbie (1/5)

0

Reputation

  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.
×
×
  • 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.