wamp server mysql question..?

Discussion in 'PHP' started by phpwreker, Dec 26, 2011.

  1. #1
    i have installed wamp

    i am trying to setup a site with with a php form..that takes user input and inserts it into the mysql database


    but my mysql database does not have a username and password

    what it have is a database name and a table..

    can someone tell me what to do next?

    i have phpmyadmin to create the database

    <?php
      $database_host = "wamplocalhost";
      $username = "donthaveone";
      $password = "donthaveone";
      $database_name = "your-database-name";
    
      // Database connection code
    ?>
     
    
    Code (markup):
    ...
     
    phpwreker, Dec 26, 2011 IP
  2. EricBruggema

    EricBruggema Well-Known Member

    Messages:
    1,740
    Likes Received:
    28
    Best Answers:
    13
    Trophy Points:
    175
    #2
    wamp has no 'standard' password, most users can use 'root' as username and '' (blank) as password! :)

    localhost/phpmyadmin
     
    EricBruggema, Dec 27, 2011 IP
  3. phpwreker

    phpwreker Greenhorn

    Messages:
    67
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #3
    thanks ..

    $username = "root";
    $password = " ";


    like that?

    first i need a form

    second i need a php script

    third i need a table

    right?

    my first baby steps towards a registration form
     
    Last edited: Dec 28, 2011
    phpwreker, Dec 28, 2011 IP
  4. shahinfosoft

    shahinfosoft Greenhorn

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    16
    #4
    basically,
    by default username is 'root' and password is nothing
    example
    if u make database config

    $user='root';
    $pass='';
     
    shahinfosoft, Dec 30, 2011 IP
  5. WPC

    WPC Peon

    Messages:
    116
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Change

    $database_host = "wamplocalhost";to $database_host = "localhost";
     
    WPC, Dec 31, 2011 IP