1. Please Sign Up if you don't have account. And Login if you have account.


[PHP]Mysql(i) connection

Discussion in 'Webmaster Tutorials' started by Yondu, Oct 19, 2017.

  1. Yondu

    Yondu Administrator Staff Member SITE ADMINISTRATOR

    515
    2,561
    153
    First step:

    We make a php frame.

    PHP:
    [ Only registered users can see the bbcode.

    You're a Guest, you don't have permission to view links. Please Register or Login to view this link.

    ]
    Step 2: We set our files in the frame

    PHP:
    [ Only registered users can see the bbcode.

    You're a Guest, you don't have permission to view links. Please Register or Login to view this link.

    ]
    Step 3: we need to let it works because we make a superscript in mysqli they come under your script

    PHP:
    [ Only registered users can see the bbcode.

    You're a Guest, you don't have permission to view links. Please Register or Login to view this link.

    ]
     
    Fishy! and hbn1618 like this.
  2. obito96

    obito96 New Member New Member

    13
    53
    3
    Wow rigth words in rigth places, i remember i use this in daily basis
     
    Fishy! likes this.
  3. darkydev

    darkydev New Member SN Confirmed Member

    9
    4
    3
    Connecting with MySQLi is oldschool after all,
    Today we use PDO cuz it more secured when you preper the codes and preper the data you use.

    Example:

    PHP:
    [ Only registered users can see the bbcode.

    You're a Guest, you don't have permission to view links. Please Register or Login to view this link.

    ]
    The PDO also assoc the data and preper it with escapes.

    so its more secured and more generic when you use more databases with other types.
    example:
    pgsql
    mssql
    and more,

    And use it on the constructor of the PDO class, example:
    PHP:
    [ Only registered users can see the bbcode.

    You're a Guest, you don't have permission to view links. Please Register or Login to view this link.

    ]
    Dont forgot on this case we need to have the PDO modules installed on our server.
     
  4. micrototus

    micrototus New Member New Member

    5
    31
    3

    You're a Guest, you don't have permission to view links. Please Register or Login to view this link.

    Connecting with MySQLi is oldschool after all,
    Today we use PDO cuz it more secured when you preper the codes and preper the data you use.

    Example:

    PHP:
    [ Only registered users can see the bbcode.

    You're a Guest, you don't have permission to view links. Please Register or Login to view this link.

    ]
    The PDO also assoc the data and preper it with escapes.

    so its more secured and more generic when you use more databases with other types.
    example:
    pgsql
    mssql
    and more,

    And use it on the constructor of the PDO class, example:
    PHP:
    [ Only registered users can see the bbcode.

    You're a Guest, you don't have permission to view links. Please Register or Login to view this link.

    ]
    Dont forgot on this case we need to have the PDO modules installed on our server.
    Click to expand...

    I agree. PDO is way better than traditional method.
     

Share This Page

Turning cookies on makes it easier for you to browse the web. Cookies are files created by websites you’ve visited, which store information, like the language you prefer or profile information. At Scriptznull, we use cookies to improve the quality of our service. Check our Privacy Policy for more information about cookies. Okay More information