How connect at my database (no replies)

This Comment will be submitted for moderation and will not be accessible to other users until it has been approved.
Submitted by programmer on Thu, 08/14/2008 - 12:42.

Hi i'm begening with my sql! I follow a tutorial using XAMPP and all my pages works. Now i have an account on 11vm-serv.net but i can't use my first page with the code to connect the database. Here is the code i use :

"

$hote="localhost";

$utilisateur="jscrochefort@localhost";

$modpasse="*******";

$connection = mysql_connect ($hote, $utilisateur, $modpasse);

echo $connection;

?>"

is it something wrong?

i have save this code as affiche.php on my computer. Must i publish it on the web or something else?

Thanks and sorry for my english!

Bertrand

Post Comment

  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. Beside the tag style "<foo>" it is also possible to use "[foo]". PHP source code can also be enclosed in <?php ... ?> or <% ... %>.