Meaning of Symbol

Discussion in 'Programming' started by jimmyb29, Feb 15, 2014.

  1. #1
    What is the meaning of the "*" symbol in this code?

    select * from tbl_guest_book where customer_email='".$_REQUEST['txtEmail']."'";

    Thanks,

    Jimmyb29
     
    jimmyb29, Feb 15, 2014 IP
  2. ThePHPMaster

    ThePHPMaster Well-Known Member

    Messages:
    737
    Likes Received:
    52
    Best Answers:
    33
    Trophy Points:
    150
    #2
    You are selecting all fields from the table tbl_guest_book. Additionally to secure your code you should escape the variables (assuming you are using mysql_connect and not PDO/mysqli_connect as you should be):

    
    select * from tbl_guest_book where customer_email='" . mysql_real_escape_string($_REQUEST['txtEmail']) . "'";
    
    Code (markup):
     
    ThePHPMaster, Feb 16, 2014 IP