Jump to content

pgrevents

Members
  • Posts

    84
  • Joined

  • Last visited

    Never

Everything posted by pgrevents

  1. Hi again hit a stumbling block for some reason my mysql wont update. It is an email activation code and I know that the variables are getting passed as there is an if statement verifying that there is a result based on variables passed here is the php 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) { mysql_query("UPDATE user_name SET active = 'yes' WHERE iamlink = '$accode' AND username = '$un' AND email = '$em' "); mysql_query("UPDATE activtion SET activated = 'yes' WHERE ac = '$accode' AND email = '$em'"); header('Location:../registration/?reg=choose'); } else { header('Location:../registration/?reg=wrongcode'); } ?> Any suggestions? thanks for your help
  2. solved it was the ajax a letter out of place thanks for the help
  3. that was the first thing i done when it wasnt working its the same variables as passed
  4. Thanks for the hints. I tried every if expresion i could think of and not working. I am sending I know they are getting recieved correctly ill try some fidgeting
  5. Its simple i know but i cannot see the errors of my ways. I am creating a sign up form and I am passing the details via ajax. I know that both variables are sending and getting picked up by the script but its returning false info. Basicly its a validation to check if the user has confirmed their password correctly. here is the code <?php $pass = $_POST['pword']; $check = $_POST['check_pass']; if ($pass == $check) { echo "yes"; } else { echo "no"; } ?> i been staring at this machine all day thats prob why i cant see the error :0 any help??
  6. What I am trying to do on the second q is just say user types in www.iamdj.co.uk the user will be presented with the main page www.iamdj.co.uk/index.php BUT if a user types in www.iamdj.co.uk/djname the user is taken to www.iamdj.co.uk/dj/index.php?display=djname or www.iamdj.co.uk/dj/display/djname regarding q1 I take it I would need direct access to the appache config file? thanks
  7. I think thats the right heading for what I am about to ask 1st q: Change filetype? Is it possible to change the lets say index.php to index.whateveriwant 2nd q: i have the a my rewrite rule in the htdocs folder if a user sets www.iamdj.co.uk/djname it will do this www.iamdj.co.uk/dj/display/djname now I already have this working but what I want is if someone goes to www.iamdj.co.uk it displays the index.php file instead of transfering. I have tried to fiddle about but since I donot know much about mod rewrite I thought I would as how these are done. I have tried google etc and I am not finding what I am wanting to know. Thanks peeps
  8. I have a a mail function on my website. I want to be able to use html email(which I basicly know how to do) Now the server in which i use i have to use the -fcommand. a working example below <?php mail("info@pgrevents.co.uk", "Feedback Form results", "Welcome to the Jungle","From: I-AM-DJ", "-finfo@iamdj.co.uk"); ?> please note that in the from section i use the -finfo@iamdj.co.uk now I am using a basic script that has worked on other servers I use and for the life of me I cannot implament the -f command anywhere and it is driving me mad. the script below <?php // Example $HTML = "<b>This is a test</b>"; $from = "info@iamdj.co.uk"; $to = "info@pgrevents.co.uk"; $subject = "I'm sending a test HTML email"; sendHTMLemail($HTML,$from,$to,$subject); function sendHTMLemail($HTML,$from,$to,$subject) { // First we have to build our email headers // Set out "from" address $headers = "From: $from\r\n"; // Now we specify our MIME version $headers .= "MIME-Version: 1.0\r\n"; // Create a boundary so we know where to look for // the start of the data $boundary = uniqid("HTMLEMAIL"); // First we be nice and send a non-html version of our email $headers .= "Content-Type: multipart/alternative;". "boundary = $boundary\r\n\r\n"; $headers .= "This is a MIME encoded message.\r\n\r\n"; $headers .= "--$boundary\r\n". "Content-Type: text/plain; charset=ISO-8859-1\r\n". "Content-Transfer-Encoding: base64\r\n\r\n"; $headers .= chunk_split(base64_encode(strip_tags($HTML))); // Now we attach the HTML version $headers .= "--$boundary\r\n". "Content-Type: text/html; charset=ISO-8859-1\r\n". "Content-Transfer-Encoding: base64\r\n\r\n"; $headers .= chunk_split(base64_encode($HTML)); // And then send the email .... mail($to,$subject,"",$headers); ?>
  9. it doesnt like the word unique does it. i changed name on table and in script all is good lol
  10. i use this site for my data hope it helps http://www.sqldumpster.com/databases/geographic/39-zip-codes.html
  11. <?php if ($_POST['part1'] =="yes"){ $name_post = $_POST['contact_name']; $email_post = $_POST['contact_email']; $unique_post = rand(487546515116548413561, 156489491961841561654484456216515); $country_ident = $_POST['country']; $complete = "complete"; mysql_connect("localhost","user","pass"); mysql_select_db("user"); if(mysql_query("INSERT INTO details (name, email, unique) VALUES('$name_post', '$email_post', '$unique_post' ) ")) { setcookie("first", "complete", time()+3600); $_SESSION['country'] = $_POST['country']; $_SESSION['unique'] = $unique_post; $_SESSION['email'] = $_POST['contact_email']; $headerlocation = "1"; } else { $headerlocation = "2"; } ///blah blah blah rest of it works ?> Hi peeps I ahve pasted the code that is the issue. I have had it working before but as soon as i add the UNIQUE into the mix it throws back mysql error I have set the script to fall back if there is a problem inserting. This is the first time i have seen this message and it was only since I added it to the script. I have tried everything in my knowledge (pretty limited) but still not getting no where. any help would be great thanks
  12. I dunno of this is the right place but here is what I am trying to do current urls are working like this; http://www.pgrevents.co.uk/profile.php?show=pgrated what I want is; http://www.pgrevents.co.uk/pgrated But I was wondering if the above could show me the same results as it would with the show=pgrated for example; www.bebo.com/pgrated takes me to that profile i dot know if any of what i said makes sense to anyone. thanks Paul
  13. I am trying to grab information out of this <div style="overflow: hidden; background-image: url(http://s.bebo.com/img/bebobadge_1_black.gif); background-repeat: no-repeat; width: 300px; height: 175px;"><span style="width:90px; height:90px;"><a href="http://www.bebo.com/badge/9211222062"><img src="http://www.bebo.com/profilephoto/9211222062a1363459018bblack.jpg" style="border: 0pt none ; margin: 10px 0pt 27px 10px; width: 90px; height: 90px;"></a></span><br><a href="http://www.bebo.com/badge/9211222062" style="padding: 0pt 0pt 0pt 10px; overflow: hidden; display: block; color: white; font-weight: bold; font-size: 16px; width: 300px;">PGR Events</a><a href="http://www.bebo.com/badge/9211222062" style="padding: 0pt 0pt 0pt 10px; display: block; color: white; font-weight: bold; font-size: 12px;">http://www.bebo.com/pgrevents</a><br></div> specifcly the profile photo bit http://www.bebo.com/profilephoto/9211222062a1363459018bblack.jpg As you will notice with the code i am trying to get is numbers then a then numbers... I can get the numbers before the a fine using; <?php session_start(); $catch = $_POST['code']; preg_match('#/profilephoto/a(\d+)#', $catch, $match); $pop = array_pop($match); ?> Its the part after the letter I cannot seem to grab. Am I on the right track here or is there another most probably easier way lol thanks Paul
  14. and I use array_pop($match); to grab that code yeeeeee
  15. oooohhhhh it worked thank you so much
  16. sorry lol. i tried it but i didnt undestand it as it kept outputting = Array() or 1. and you said dont badger you so kept looking on php.net
  17. I have actualy been looking into this using parse_url here is an example <?php $catch = $_GET['catch']; print $catch; print "<br />"; ///GO GO GADGET print_r(parse_url($catch)); print "<br />"; echo parse_url($catch, PHP_URL_PATH); ?> which gives me an out put of; http://uk.video.yahoo.com/watch/5005027/13315673 Array ( [scheme] => http [host] => uk.video.yahoo.com [path] => /watch/5005027/13315673 ) -> this is using the last echo in the code = /watch/5005027/13315673 that is getting closer to what I am looking for. Am I on the right track? thanks
  18. i understand the basics and will look more into th code you have provided thank you for your help
  19. Again not to confident with php I am trying to get a specific part of a url for example http://www.pgrevents.co.uk/process/yvideo.php?catch=http://uk.video.yahoo.com/watch/5005027/13315673 I need to get the 5005027 Does anyone have any ideas? I tried looking for examples but I cant seem to get any thanks Paul
  20. i never thought of that what i done was removed them using ereg_replace function but that sounds much better and probably more of a space saver in the long run. thanks
  21. sorry for the delay what a simple solution lol thanks... now how would one remove the line breaks from showing in the text area for example updating the entered text? thanks again.
  22. thank you i had been looking at that script all day it hurt lol. it now sends but i am getting a verification error guess ill get onto my hsp
×
×
  • 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.