SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Apr 2011
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question regarding "mysql_connect..." code

    I'm creating a form where the data will be sent to a database at my server. My question is about the line of code below:

    <?php
    // Connect to MySQL
    mysql_connect("my_server", "my_username", "my_password")
    etc,
    etc,
    etc,
    ?>

    My concern is about the line that asks me to enter my server, username and password.

    Can't everyone see that? Am I giving everyone access to my server?

    Forgive me for my ignorance.

    Thanks.

  2. #2
    Keeper of the SFL StarLion's Avatar
    Join Date
    Feb 2006
    Location
    Atlanta, GA, USA
    Posts
    3,748
    Mentioned
    71 Post(s)
    Tagged
    0 Thread(s)
    PHP is a Server-Side language.

    anything inside your <?php ?> tags will not appear in, or even be sent to, the user's browser (except for the content of output commands, obviously, like echo and print)


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •