Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. Linux, Apache, MySQL, PHP
  4. php basics

php basics

Scheduled Pinned Locked Moved Linux, Apache, MySQL, PHP
phpdatabasetutorial
4 Posts 4 Posters 3 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    s4_sabahatf
    wrote on last edited by
    #1

    hi im new in Php,can any one plz guide in linking database with Php

    L R I 3 Replies Last reply
    0
    • S s4_sabahatf

      hi im new in Php,can any one plz guide in linking database with Php

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      First step google[^] Second step, click first google result[^] Third step, check php.net[^] If all else fails, click me.[^]

      1 Reply Last reply
      0
      • S s4_sabahatf

        hi im new in Php,can any one plz guide in linking database with Php

        R Offline
        R Offline
        Rao Rafique
        wrote on last edited by
        #3

        In PHP, this is done with the mysql_connect() function. Syntax mysql_connect(servername,username,password); Parameter Description servername Optional. Specifies the server to connect to. Default value is "localhost:3306" username Optional. Specifies the username to log in with. Default value is the name of the user that owns the server process password Optional. Specifies the password to log in with. Default is ""

        "Programming is a fun"

        1 Reply Last reply
        0
        • S s4_sabahatf

          hi im new in Php,can any one plz guide in linking database with Php

          I Offline
          I Offline
          Ioannis_o5
          wrote on last edited by
          #4

          Let me contribute to solving your struggling : First, because all your php pages that access mysql must connect to the Db it is a wise tradition to create an include file [call it for instance "dbconn.php"] with the following content : ============================ ============================ [NOTE the "localhost" must change if the target DB is not on your system but on a Host] then whenever you create a new php script start with : "; echo 'Prod.Name='. $row["ProductName"]."
          "; } ======================= Good luck s4 - php is great remember ! ioannis_o5

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups