Results 1 to 3 of 3
  1. #1
    Join Date
    May 2004

    Unhappy Unanswered: php code?????????????

    hello, i need help people. it is my wish to connect with mySQL database.
    but im not sure of the code required, i've tried some but with fantastic failure.
    or is any one out their aware of an easier method for adding, viewing database's. via php code or other means??????????

  2. #2
    Join Date
    May 2004

    Connect to MySQL Database

    In the case you requiere to connect to mysql server, and manage the databases or the tables and its properties I recommend to use the following software:

    It's easy to install and configure,
    in the case you search for php code to include in your pages use this:
    1) first your file must be .php
    2) apache mus be running
    3) php.ini must be reviewed for the correct parameters
    4) mysql must be running and you must be a valid DB user with privileges.

    $conex = mysql_connect("localhost", "root", "")
    or die("No se puede realizar la Conexion!");
    $consulta = 'SELECT * from Name_of_table ';
    $resultado = mysql_query($consulta,$conex);
    $Num_datos = mysql_num_rows($resultado);
    echo '<h1 ALIGN="CENTER"><font size="4" color="#2DA454">Some TExt </font></h1>';
    echo '<Table Border="1">';
    while ($Objeto = mysql_fetch_object($resultado))
    //creating the table for the fields
    echo '<TR>';
    echo '<td>ID_X: </td>';
    echo '<td><a href="another.php?ID=',$Objeto->ID_X,'">',$Objeto->NAme_X, '</td>';
    echo '</TR>';
    echo '</Table>'; //end of table

  3. #3
    Join Date
    Oct 2003
    Chicago, IL

    Here is my suggestion

    I suggest that you use PHPTriad software bundle, which comes pre-configured with Apache, PHP and MySQL. You can download it at the following page:
    DigiOz Multimedia

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts