Jump to content

floridaflatlander

Members
  • Posts

    671
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by floridaflatlander

  1. Is this

    id() . "$y=$a"; 

    a typo above in your activation email?

     

     

    My problem is it isn't sending the code to the email specified

     

    Try an echo somewhere on your register page to see if your assigning the email address to the $email variable like you think you are.

  2. If someone uses AOL, which I only know a few people that do, can't their IP change during use?

     

    Some people use HTTP_USER_AGENT, someone had a link on here that went to a site explaining it's use as well as encrypting it with md5 instead of using an ip. Hopefully who ever provided the link will chime in it was a good article.

     

    My set up is basically

    if ((!isset($_SESSION['mem_id'])) OR (!isset($_SESSION['user_agent']) OR ($_SESSION['user_agent'] != md5($_SERVER['HTTP_USER_AGENT'])))){
    	Not a logged in member, redirect
    } else {do whatever}
    

  3. You'r deleting it from phpmyadmin? I think this will do it if you put it in your sql of phpmyadmin fot that table

     

    DELETE FROM table_name WHERE id != 16430; if 16430 is the record you want to keep

     

    OR

     

    DELETE FROM table_name WHERE id != 16430 And cupID = 45; for a little insurance and if you want to get rid of only the 45's

  4. Using strip_tags with the second parameter opens up XSS attacks. ...

     

    I can see how strip_tags($input, <a>); could be used for a XSS attack but how could strip_tags($input, <i>); be  used for a XSS attack?

  5. The answer to your questions is yes, depending on the category(url aka get statement) I call different css scripts.

    Are you sure you have your file paths right?

    Are you sure your style actually effects the web page?

     

    If they're correct the code Muddy_Funster gave you will work. (I like single quotes)

    echo '<head>

    <title>You should always have a title in the header</title>

    <link rel="stylesheet" type="text/css" href="rcm/stylesheet.css">

    </head>';

     

    The code Muddy_Funster had had "rcf/stylesheet.css", you didn't check that? Again is the path correct, are there any typos here? Are you sure the css effects the page?

     

  6. And why would someone want the redundancy of the statement the way I had originally copied it?

     

    Are you talking about the "if (isset($_POST['action']) && $_POST['action'] == 'submitform')". ? I don't know, I do this with my sessions but not my submit POST

  7. if (isset($_POST['action']) && $_POST['action'] == 'submitform')",

     

    isset checks to see if $POST['action'] has a value

     

    so you're basiclly saying, if (action has a value) & (that value equals submitform) run the following script

     

    heres how I do my submits

     

    f (isset($_POST['submit'])){ 
    $roastturkey = $_POST['roastturkey'];
    $broccoli = $_POST['broccoli'];
    $brisket = $_POST['brisket'];
    $carrots = $_POST['carrots'];
    
    $sql = "INSERT INTO pass (roastturkey,broccoli,brisket,carrots) VALUES ('$roastturkey','$broccoli','$brisket','$carrots')";
    $result=mysql_query($sql); 
    
    if($result){
        echo "Successful";
      }else {
        echo "ERROR";
      }     
    } // end of it

    this is my button

    <input type="submit" name="submit" value="Submit" />

  8. Where was your update script at in relation to the above?

     

    And it may be just me but I'd put all that code in your "if (isset($_POST['action']) && $_POST['action'] == 'submitform')", that way it only runs if the if is true.

     

  9. Phpfreaks; however, YOU, as one of the noobies, are responsible for bringing the brownies every other Friday.

     

    That's true because I had to bring them every other Friday until I had 100 post.

     

     

    As an added note I think phpfreaks is great for php and sql help.

  10. Thanks kickstart &  mikosiko.

     

    This forum is the best.

     

    And this explains why I was getting 90 plus results from 15 records with some of the code I played with last night

    This should still work, but what it will do is join every row from those 2 tables (a CROSS JOIN), irrespective of the id_mem fields. This is one way to get a massive number of records returned (if each table had 100 records, you would get 10000 rows brought back).

     

    Thanks again

    S

  11. Thanks, that works and looks better than this,

     

    $q = "SELECT photos.thumb, product.id_prod, product.title, photos.thumb_width, photos.thumb_height
    	FROM members, product LEFT JOIN photos
    	ON product.id_prod = photos.id_prod
    	AND photos.main_photo  =  '1'
    	WHERE product.publish = '1'
    	AND product.id_mem = members.id_mem
    	AND members.mem_group >=1 AND members.mem_group <100
    	ORDER BY product.id_prod DESC";
    
    

     

    which I got to work last night, the odd thing is when I take the where clause out it doesn't work.  I'll look at the links you gave me and keep playing with these and see if I can understand it better.

     

    Thanks again

    S

  12. mikosiko, I added the LEFT JOIN and took out the OR

     

    		$q = "SELECT photos.thumb, product.id_prod, product.title, photos.thumb_width, photos.thumb_height
    	FROM members, product LEFT JOIN photos
    	WHERE product.publish = '1'
    	AND product.id_mem = members.id_mem
    	AND mem_group >=1 AND mem_group <100
    	AND product.id_prod = photos.id_prod
    	AND photos.main_photo  =  '1'
    	ORDER BY product.id_prod DESC"; 

     

    I kept getting this error: Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE sn_product.publish = '1' AND sn_product.id_mem = sn_members.id_mem A' at line 3

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