Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Parse error: syntax error, unexpected T_STRING in C:\wamp\www\register.php on line 9

  • 03-02-2008 10:58PM
    #1
    Closed Accounts Posts: 51 ✭✭


    hi guys i have an error coming up all the time, and i have spent so so much time trying to sort it that its just not worth me lokng anymore, because i just can't find it!
    i just gave a sample of code there down below.
    here is the code:

    <?PHP


    //Database Information

    $dbhost = "localhost";
    $dbname = "mydatabase";
    $dbuser = "root;
    $dbpass = "gasman";

    //Connect to database

    mysql_connect ( $dbhost, $dbuser, $dbpass)or die("Could not connect: ".mysql_error());
    mysql_select_db($dbname) or die(mysql_error());

    $name = $_POST;
    $email = $_POST;
    $username = $_POST;
    $userid = $_POST;
    $Type = $_POST;
    $Location = $_POST;
    $Availability = $_POST;
    $password = $_POST[‘password’];
    $StarRating = $_POST;


Comments

  • Closed Accounts Posts: 81 ✭✭dzy


    $dbuser = "root";


  • Registered Users, Registered Users 2 Posts: 7,468 ✭✭✭Evil Phil


    Personally I wouldn't connect to the db as root, I'd create a limited account for my application as connect through that.


Advertisement