Jump to content

Jay2391

Members
  • Posts

    167
  • Joined

  • Last visited

    Never

Everything posted by Jay2391

  1. I have this echo statement I want $r_win - $r_loss - $r_tie to be in blue - red and green fonts...can i do that ???? [code] echo "<pre>";   printf ("<h5>%-20s%-20s%-20s%-20s%-20s \n", "$r_user_name", "$r_win - $r_loss - $r_tie", "$r_rank", "$r_eliminated", "$r_final_result", "<br></h5>");      echo "</pre>"; [/code]
  2. I did it like this tables didn't work ... echo "<pre>";   printf ("%-20s%-20s%-10s%-10s%-10s \n", "$r_user_name", "$r_win - $r_loss -  $r_tie", "$r_rank", "$r_eliminated", "$r_final_result", "<br>");    echo "</pre>"; hope that helps some people
  3.   like i explain before it does this ... result1           result2                   result3 when aling center is cool but i need it to the left
  4. print "<table align='left'> <tr align='center'> <th>Wins</th> <th>Losses</th> <th>Ties</th> </tr> <tr align='center'> <td>$r_win</td> <td>$r_loss</td> <td>$r_tie</td> </tr> </table><BR>"; this cascades....and i know you think I am retarded but I use desing mode on dreamweaver for this that is why I do not check this to often
  5. print "<table align='left'>                                      <-------------------I need to use left here <tr align='center'> <th>Wins</th> <th>Losses</th> <th>Ties</th> <tr align='center'> <td>$r_win</td> <td>$r_loss</td> <td>$r_tie</td> </table> "; and it displays like this Wins Losses Ties Wins Losses Ties Wins Losses Ties Wins Losses Ties 0        0        0    0        0    0 0        0        0    0        0    0 but if i do a <br> it cascades
  6. where...  ??? print "<table align='center'> <tr align='center'> <th>Wins</th> <th>Losses</th> <th>Ties</th> <tr align='center'> <td>$r_win</td> <td>$r_loss</td> <td>$r_tie</td> </table><br>";
  7. the samples are on top .... is exactly how I am doing it ... ???
  8. :-\ Oh well thanks for this one I'll figure out soon and post how i did it ... may i'll do it with css .... php is gettiing the best of me ...LOL
  9. when i do that it cascades... Result 1           result 2                         result 3                                   ......
  10. Better Example: My Code: print "<br><br><p><h4>Players Records:</h4></p>";       while($r_row = mysql_fetch_array($r_result)){             $r_result_id = $r_row['result_id'];         $r_tourney_name= $r_row['tourney_name']; $r_user_name = $r_row['user_name']; $r_win= $r_row['win'];   $r_loss= $r_row['loss']; $r_tie= $r_row['tie']; $r_rank= $r_row['rank']; $r_scor1= $r_row['scor1']; $r_scor2= $r_row['scor2']; $r_scor3= $r_row['scor3']; $r_scor4= $r_row['scor4']; $r_scor5= $r_row['scor5']; $r_scor6= $r_row['scor6']; $r_scor7= $r_row['scor7']; $r_eliminated= $r_row['eliminated']; $r_final_result= $r_row['final_result']; $r_status= $r_row['status'];             print "<p>User: $r_user_name | Win- $r_win | Loss- $r_loss | Tie- $r_tie | Rank- $r_rank | Satus: $r_eliminated | Final Result: $r_final_result</p>";         } Display like this : User: test_3 | Win- 0 | Loss- 0 | Tie- 0 | Rank- 0 | Satus: 0 | Final Result: 0 User: test_5 | Win- 0 | Loss- 0 | Tie- 0 | Rank- 0 | Satus: 0 | Final Result: 0 User: test_6 | Win- 0 | Loss- 0 | Tie- 0 | Rank- 0 | Satus: 0 | Final Result: 0 I want this .....     Users          Win            Loss            Tie            Rank          Status                  Final Result user _Name        0                0                0              0                0                            0 User _name2        0                0                0              0                0                            0
  11. Dosen't work .... le down to the right because is not center is left aligment <?php you get the data sca print<<<HERE <table align='center'> <tr align='center'> <th>Wins</th> <th>Losses</th> <th>Ties</th> <tr align='center'> <td>$r_win</td> <td>$r_loss</td> <td>$r_tie</td> </table> HERE; ?>
  12. I know HTML and I coded on php in wich I am intermediate.... I am using dreamweaver and i can get the data to show .... and when single lines i have no issues... but this is an array with a while statement.... so my question again is .... Cell one gets data , cell 2 gets data cell 3 gets data and as i need cells are added.... so I apreciate your comments but i need a example or awnser so maybe if you have a reference on how to combine HTML and PHP for display i can read ...I have plenty of books but they do not show rules to follow for the formating of data display on php
  13. I try that, I ask on the HTML forum long time ago ... no one knows.... so I just want to do emty spaces....I give up on HTML
  14. how  do you add empty spaces... to make it look cool or table it .... This is right now Code: print "<p>Wins - $r_win " . " Loss - $r_loss " . "Ties - $r_tie</p>"; [u]Displays:[/u] Wins - 0 Loss - 0 Ties - 0 I[color=red] want .....[/color] Wins - 0            Loss - 0            Ties - 0                [color=blue][font=Verdana]or [/font] [/color] Wins          Loss          Ties   0              0              0
  15. Yes is just a tree view how do I acomplish that ????
  16. What I am asking ..... In HTML you just put tables and boxes where ever you like but when you ask for information in SQl thru PHP it displays in lines Example: Print '<p> hhdcskjs  </p>'; But I want to create a bracket ... 1 ------|        data update here 2      |---------| ------|            |                       |                  Data update here                       |-------------                       | 3                    | ------|            | 4      |---------| ------|        So is been kind of hard to fisgure out how to manage the view in wish PHP will display the results using lines like the example above remember I am displaying data base of information I am getting from a SQL and when updated on SQL it will display the data diferently....
  17. Okay I created all my code works great ... so no codding issues here. what I have is a while statement that I display some team names $team1     vs $team2 $team3   vs $team4 and I can get that printed using the print <p></p>; and I can make the winners to show at the bottom but that is not quite what I want .... I want the information to be display like a braket ....I try using HTML and PHP tables but the arrays did not work propertly and you can break down how to display. Do you have any sugestions in how to covert the look of the display of information... example: Table teams, colum call Team_names has ......$team1,$team2,$team3,$team4 while($row = array($result){     $team = $row['team_names'];     echo " $teams"; }
  18. Okay I created all my code works great ... so no codding issues here. what I have is a while statement that I display some team names $team1     vs $team2 $team3   vs $team4 and I can get that printed using the print <p></p>; and I can make the winners to show at the bottom but that is not quite what I want .... I want the information to be display like a braket ....I try using HTML and PHP tables but the arrays did not work propertly and you can break down how to display. Do you have any sugestions in how to covert the look of the display of information... example: Table teams, colum call Team_names has ......$team1,$team2,$team3,$team4 while($row = array($result){     $team = $row['team_names'];     echo "<br>$teams"; }
  19. I was changing some code and now i get this error in one of my pages do some knows what it is??? and how to urn it off!!! Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0
  20. BTW THAT WORK I JUST WANT to LEARN HOW to MAKE SQL HANDLE THAT REQUEST ...
  21. Okay you made a point that i do not understand how do I make SQL handle that may be and example i didnt get is what you said was manual or SQL AUTO ???
  22. Okay here is the deal ... I have ann ID colum on this table call... result_id so when i Insert new data I need that id field to auto increment and put a number so first i get the acending  last number ...          $id = $rowr['result_id']; and then i add 1 so when it gets inserted you the number PLUS ONE ..                            $result_id = $id + 1; what happends is that the [color=red]first time I insert the record [/color] get the number PLUS ONE if the last record is 100 I get 101... [color=red]BUT WHEN I DO IT AGAIN WITH A NEW RECORD IT TELLS ME THAT IS A PRIMARY KEY (CORRECT I DID THAT) AND THAT IT ALREDY EXIST... WHAT I DO NOT GET IS WHY IT WORKS ONCE AND THEN IT DOSENT WORK ANYMORE. WHY IF THE LAST NUMBER IS 101 IT DOSENT INCREASE TO 102????[/color] error.... Caused the following error: Duplicate entry '101' for key 1 ??? CODE***************************** <?php include("DB.php"); $table = 'md_user_main'; $tablet = 'tourney'; $tablea = 'md_user_main'; $tabler = 'results'; $tourneyn = $_SESSION['tourneyn'] ;       ini_set('display_errors', 1);       error_reporting(E_ALL & ~E_NOTICE);          $tc = mysql_connect ($host, $user, $pass);          $db = mysql_select_db ($database, $tc);      $query = "SELECT * FROM $table WHERE (first_name=\"$fname\") ";      $result = mysql_query($query);      $row = mysql_fetch_array($result);                  $uname= $row['user_name'];                   $queryr = "SELECT * FROM $tabler ORDER BY result_id ASC";      $resultr = mysql_query($queryr, $tc);      $rowr = mysql_fetch_array( $resultr );                  $id = $rowr['result_id'];                            $result_id = $id + 1;                       $win = 0;                       $loss = 0;                       $tie = 0;                       $scor1 = 0;                       $scor2 = 0;                       $scor3 = 0;                       $scor4 = 0;                       $scor5 = 0;                       $scor6 = 0;                       $scor7 = 0;                       $eliminated = 0;                       $final_result = 0;         $sql = "INSERT INTO $tabler ( result_id, tourney_name, user_name, win, loss, tie, scor1, scor2, scor3, scor4, scor5, scor6, scor7, eliminated,        final_result ) VALUES ( \"$result_id\", \"$tourneyn\", \"$uname\", \"$win\", \"$loss\", \"$tie\", \"$scor1\", \"$scor2\", \"$scor3\", \"$scor4\", \"$scor5\", \"$scor6\", \"$scor7\", \"$eliminated\", \"$final_result\")";         $resultf = mysql_query($sql, $tc) OR die ("The query:".$sql."Caused the following error: ".mysql_error());          if($sql){       echo "$result_id<br>";   echo "$tourneyn<br>";       echo "$uname<br>";               echo "$win<br>";               echo "$loss<br>";               echo "$tie<br>";               echo "$scor1<br>";               echo "$scor2<br>";               echo "$scor3<br>";               echo "$scor4<br>";               echo "$scor5<br>";               echo "$scor6<br>";               echo "$scor7<br>";               echo "$eliminated<br>" ;               echo "$final_result<br>" ; } ?>
  23. I tough i had try that and it didn't work ... but it seems to work now ....anyways thanks and sorry for the bugging with this... makes me mad i tought i try that maybe next time i should close my browser
  24. BTW that was pretty dumb for PHP to do but i guess it make sence to them
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.