SitePoint Sponsor

User Tag List

Page 2 of 2 FirstFirst 12
Results 26 to 35 of 35

Thread: form help

  1. #26
    does not play well with others frezno's Avatar
    Join Date
    Jan 2003
    Location
    Munich, Germany
    Posts
    1,391
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    it seems that your access data aren't right. Maybe you want to check this.
    Is your server localhost (as shown in the example) ?
    We are the Borg. Resistance is futile. Prepare to be assimilated.
    I'm Pentium of Borg.Division is futile.Prepare to be approximated.

  2. #27
    SitePoint Enthusiast
    Join Date
    Oct 2003
    Location
    USA
    Posts
    87
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the server i use are very strick, so i have to use that access data..

  3. #28
    does not play well with others frezno's Avatar
    Join Date
    Jan 2003
    Location
    Munich, Germany
    Posts
    1,391
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well, to me it seems you are using wrong access data. That's the same as with a key: Wrong key and the door won't open.
    You should check your data as suggested before.
    We are the Borg. Resistance is futile. Prepare to be assimilated.
    I'm Pentium of Borg.Division is futile.Prepare to be approximated.

  4. #29
    SitePoint Enthusiast
    Join Date
    Oct 2003
    Location
    USA
    Posts
    87
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    tnx for the code

    i fanally got some of the fields inplace, your code was helpful..

    Thanxs guys

  5. #30
    SitePoint Enthusiast
    Join Date
    Oct 2003
    Location
    USA
    Posts
    87
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    this is the code, but the only things that's not working right is the loop...




    <html>
    <head>
    <title> Our List of Jokes</title>
    </head>

    <body>

    <?php
    //connect to the database server
    $dbcnx = @mysql_connect('125.0.0.1','nbrec','mblackxxx');
    if(!$dbcnx)
    {
    die('<p>Unable to connect to the database server at this time. </p>');
    }

    // Select the jokes database
    if (!@mysql_select_db('nbrec_com_-_db'))
    {
    die('<p>Unable to locate the joke database at this time.</p>');
    }

    ?>
    <p> Here are all the jokes in our database: </p>
    <blockquote>
    <?php

    // Request the text of all the jokes
    $result = @mysql_query("SELECT ENRLL_Fname, ENRLL_Lname, ENRLL_Email FROM RegistrationTBL");
    if (!$result)
    {
    die('<p> Error performing query: .mysql_error().</p>');
    }

    // Display the text of each joke in a paragraph

    while($row=mysql_fetch_array($result))
    {
    echo('<p>' .$row['ENRLL_Fname'] . '</p>');
    echo('<p>' .$row['ENRLL_Lname'] . '</p>');
    echo('<p>' .$row['ENRLL_Email'] . '</p>');
    }
    ?>
    </blockquote>
    </body>
    </html>

  6. #31
    Non-Member hyperimage's Avatar
    Join Date
    Dec 2003
    Location
    Croatia
    Posts
    259
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    this goes into the table tag which is puted outside the php script!
    it should work!
    PHP Code:
    <?php
    $result 
    = @mysql_query("SELECT ENRLL_Fname, ENRLL_Lname, ENRLL_Email FROM RegistrationTBL");
    while(
    $row=mysql_fetch_array($result))
    {
    count 0;
    if(
    $row[1]!="") {
    $ENRLL_Fname $row[1];
    $ENRLL_Lname $row[2];
    $ENRLL_Email  $row[3];
    echo 
    "<tr><td>$row[1]<br><br>$row[2]<br><br>$row[3]</td></tr>\n";
    count ++;
    }
    }
    ?>
    i changed something..now it must work!
    cya

  7. #32
    SitePoint Enthusiast
    Join Date
    Oct 2003
    Location
    USA
    Posts
    87
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    good it worked ...thanxs...


    here's the functional code...for anybody who run into this problem.....



    <?php
    $dbhost = "125.0.0.1";
    $dbuser = "nbrec";
    $dbpass = "mwhitexxx";
    $dbname = "lacre_com_-_db";

    $connect = mysql_connect("$dbhost", "$dbuser", "$dbpass") or die(mysql_error());
    mysql_select_db("$dbname", $connect) or die(mysql_error());
    ?>
    <html>
    <body>
    <table font face="verdana" bordercolor="#000000" style="font-size:12px; border-collapse: collapse; text-align: center; border: 1px solid #849DD7" cellpadding="0" cellspacing="2">
    <tr bgcolor="#1072BA" width="61" >
    <td style="font-family: Verdana; font-size: 10px" bgcolor="#1072BA"><b><font face="Verdana" color="#FFFFFF"> Date </font></b></td>
    <td style="font-family: Verdana; font-size: 10px" bgcolor="#1072BA"><b><font face="Verdana" color="#FFFFFF"> First Name </font></b></td>
    <td style="font-family: Verdana; font-size: 10px" bgcolor="#1072BA"><b><font face="Verdana" color="#FFFFFF"> Last Name </font></b></td>
    <td style="font-family: Verdana; font-size: 10px" bgcolor="#1072BA"><b><font face="Verdana" color="#FFFFFF">Email</font></b></td>
    <td style="font-family: Verdana; font-size: 10px" bgcolor="#1072BA"><b><font face="Verdana" color="#FFFFFF"> Sex </font></b></td>
    <td style="font-family: Verdana; font-size: 10px" bgcolor="#1072BA"><b><font face="Verdana" color="#FFFFFF"> Age </font></b></td>
    <td style="font-family: Verdana; font-size: 10px" bgcolor="#1072BA"><b><font face="Verdana" color="#FFFFFF"> Address </font></b></td>
    <td style="font-family: Verdana; font-size: 10px" bgcolor="#1072BA"><b><font face="Verdana" color="#FFFFFF"> City </font></b></td>
    <td style="font-family: Verdana; font-size: 10px" bgcolor="#1072BA"><b><font face="Verdana" color="#FFFFFF"> Zip </font></b></td>
    <td style="font-family: Verdana; font-size: 10px" bgcolor="#1072BA"><b><font face="Verdana" color="#FFFFFF"> State </font></b></td>
    <td style="font-family: Verdana; font-size: 10px" bgcolor="#1072BA"><b><font face="Verdana" color="#FFFFFF"> Phone # </font></b></td>
    <td style="font-family: Verdana; font-size: 10px" bgcolor="#1072BA"><b><font face="Verdana" color="#FFFFFF"> Team Name </font></b></td>
    <td style="font-family: Verdana; font-size: 10px" bgcolor="#1072BA"><b><font face="Verdana" color="#FFFFFF"> Coach Name </font></b></td>
    <td style="font-family: Verdana; font-size: 10px" bgcolor="#1072BA"><b><font face="Verdana" color="#FFFFFF"> Comments </font></b></td>

    </tr>
    <?php
    $result= mysql_query("select * from RegistrationTBL order by 'id' desc");
    if (!$result)
    {
    die('<p> Error performing query: .mysql_error().</p>');
    }
    while ($row= mysql_fetch_array($result))
    {
    $count=0;
    if ($row[1]!="")
    {
    $name = $row[1];
    $lname= $row[2];
    $email= $row[3];
    $use_sex= $row[4];
    $age= $row[5];
    $address= $row[6];
    $city= $row[7];
    $zip= $row[8];
    $state= $row[9];
    $phnum= $row[10];
    $TeamName= $row[11];
    $CoachName= $row[12];
    $comment= $row[13];
    $date=$row[14];
    }
    echo "<tr>
    <td>$row[14]</td>
    <td>$row[1]</td>
    <td>$row[2]</td>
    <td>$row[3]</td>
    <td>$row[4]</td>
    <td>$row[5]</td>
    <td>$row[6]</td>
    <td>$row[7]</td>
    <td>$row[8]</td>
    <td>$row[9]</td>
    <td>$row[10]</td>
    <td>$row[11]</td>
    <td>$row[12]</td>
    <td>$row[13]</td>

    </tr>\n";
    $count ++;
    //mysql_free_array($result);
    }
    ?>
    </table></body></html>

  8. #33
    Non-Member hyperimage's Avatar
    Join Date
    Dec 2003
    Location
    Croatia
    Posts
    259
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    can u explan better to me how u want format the table under php with onmouseover function!!!!!
    cya

  9. #34
    SitePoint Enthusiast
    Join Date
    Oct 2003
    Location
    USA
    Posts
    87
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sure, i want to create a onmouseover functions that could do something like this...

    http://nbrec.com/alopez/posicion.html

  10. #35
    Non-Member hyperimage's Avatar
    Join Date
    Dec 2003
    Location
    Croatia
    Posts
    259
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    echo 
    HTML Code:
    <td onMouseOver="this.bgColor='#cdcdcd'" onMouseOut="this.bgColor='#ffffff'">$row[14]</td>
    <td onMouseOver="this.bgColor='#cdcdcd'" onMouseOut="this.bgColor='#ffffff'">$row[1]</td>
    <td onMouseOver="this.bgColor='#cdcdcd'" onMouseOut="this.bgColor='#ffffff'">$row[2]</td>
    <td onMouseOver="this.bgColor='#cdcdcd'" onMouseOut="this.bgColor='#ffffff'">$row[3]</td>
    <td onMouseOver="this.bgColor='#cdcdcd'" onMouseOut="this.bgColor='#ffffff'">$row[4]</td>
    <td onMouseOver="this.bgColor='#cdcdcd'" onMouseOut="this.bgColor='#ffffff'">$row[5]</td>
    <td onMouseOver="this.bgColor='#cdcdcd'" onMouseOut="this.bgColor='#ffffff'">$row[6]</td>
    <td onMouseOver="this.bgColor='#cdcdcd'" onMouseOut="this.bgColor='#ffffff'">$row[7]</td>
    <td onMouseOver="this.bgColor='#cdcdcd'" onMouseOut="this.bgColor='#ffffff'">$row[8]</td>
    <td onMouseOver="this.bgColor='#cdcdcd'" onMouseOut="this.bgColor='#ffffff'">$row[9]</td>
    <td onMouseOver="this.bgColor='#cdcdcd'" onMouseOut="this.bgColor='#ffffff'">$row[10]</td>
    <td onMouseOver="this.bgColor='#cdcdcd'" onMouseOut="this.bgColor='#ffffff'">$row[11]</td>
    <td onMouseOver="this.bgColor='#cdcdcd'" onMouseOut="this.bgColor='#ffffff'">$row[12]</td>
    <td onMouseOver="this.bgColor='#cdcdcd'" onMouseOut="this.bgColor='#ffffff'">$row[13]</td>
    PHP Code:
    '; 
    i havent understood good what u want!!!
    hope this will be helpfull!!!
    cya


Bookmarks

Posting Permissions

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