Page 7 of 9 FirstFirst ... 56789 LastLast
Results 61 to 70 of 86

Thread: MySQL Database showing on a page.

  1. #61
    Join Date
    Apr 2006
    Posts
    429
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    can u make ur requests.php to requests.txt just to really see if we're on the page? tnx
    Last edited by jr_yeo; 07-22-2006 at 04:27 PM.
    Please don't mind me. I am just posting a lot of nonsense.

  2. #62
    Join Date
    Jun 2006
    Posts
    148
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I sourta dont know if i can. It has my passwords and stuff.
    Cheap Webhosting At ONE TIME fees! Also offering Scripts, Software, Web Designs, and Graphic Designs. Outstanding Designs and Webhosting!

  3. #63
    Join Date
    Apr 2006
    Posts
    429
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    oic oh right i forgot
    Last edited by jr_yeo; 07-23-2006 at 01:10 AM.
    Please don't mind me. I am just posting a lot of nonsense.

  4. #64
    Join Date
    Jun 2006
    Posts
    148
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    :[ :[ :[ :[ :[
    Cheap Webhosting At ONE TIME fees! Also offering Scripts, Software, Web Designs, and Graphic Designs. Outstanding Designs and Webhosting!

  5. #65
    Join Date
    Apr 2006
    Posts
    429
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    that's all i could do to help i running out of ideas on how to help you solve the problem
    Please don't mind me. I am just posting a lot of nonsense.

  6. #66
    Join Date
    Jun 2006
    Posts
    148
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    God damn. I really need help.
    Cheap Webhosting At ONE TIME fees! Also offering Scripts, Software, Web Designs, and Graphic Designs. Outstanding Designs and Webhosting!

  7. #67
    Join Date
    Jun 2006
    Posts
    148
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Yay.

    XD i played around w/ it and i got it like 1/2 working.
    I still have like two little problems,
    The table is poorly aligned.
    And The delete function wont work.


    sample:http://smileyoureahabbo.freepgs.com/...x/requests.php
    Cheap Webhosting At ONE TIME fees! Also offering Scripts, Software, Web Designs, and Graphic Designs. Outstanding Designs and Webhosting!

  8. #68
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Not enough info. What's the code now, then?
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  9. #69
    Join Date
    Jun 2006
    Posts
    148
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Code:
    <?php
    
    $conn = mysql_connect('localhost', '', '');
    mysql_select_db('');
    $tablename = 'request';
    $uniquerow = 'ID';
    if(isset($_GET['delete']))
      if(!is_numeric($_GET['delete'])) die();
      else mysql_query('delete from `' . $tablename . '` where ' . $uniquerow . '=\'' . $_GET['delete'] . '\';');
    
    $rs = mysql_query('select * from `' . $tablename . '`;');
    $row = mysql_fetch_array($rs);
    $cols = array();
    foreach($row as $k => $v)
      array_push($cols, $k);
    array_push($cols, 'del');
    echo('<table><tr>');
    for($i = 0; $i < count($cols); ++$i)
      echo('<th>' . $cols[$i] . '</th>');
    echo('</tr>');
    do {
      $row['del'] = '<form action="?delete=' . $row[$uniquerow] . '" method="get"><input type="submit" value="Delete"></form>';
      echo('<tr>');
      for($i = 0; $i < count($cols); ++$i) {
    ?>
    <td><?php echo($row[$i]); ?></td>
    <?php
      }
      echo('</tr>');
    } while($row = mysql_fetch_array($rs));
    echo('</table>');
    ?>
    Cheap Webhosting At ONE TIME fees! Also offering Scripts, Software, Web Designs, and Graphic Designs. Outstanding Designs and Webhosting!

  10. #70
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Code:
    <td><?php echo($row[$i]); ?></td>
    Should be:
    Code:
    <td><?php echo($row[$cols[$i]]); ?></td>
    I think.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

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
  •