Php connection parse error

June 21, 2009 at 00:43:29
Specs: Windows Vista
I have made php connection but when i run,it gives me parse error on line 3. Below i show the code:-

<?php

&host="localhost";

&user="root";
&password="";

mysql_connect(&host,&user,&password);
mysql_select_db("sample");
session_start()

?>


See More: Php connection parse error

Report •


#1
June 23, 2009 at 02:56:06
Unless you're using reference (&$some_var), php vars are declared with $, so


    <?php

    $host="localhost";

    $user="root";
    $password="";

    mysql_connect($host,$user,$password);
    mysql_select_db("sample");
    session_start()

    ?>


Report •
Related Solutions


Ask Question