Help with recordset Delete page

Discussion in 'PHP' started by netlasher, Jan 18, 2008.

Thread Status:
Not open for further replies.
  1. #1
    I am trying to create a recordset page with delete buttons.. But for some reason it just won't delete the records.. I am not sure what exactly i am doing wrong.. If anyone helps me get this solved or puts in some good effort i will give them a free web hosting package for a year.. I guarantee its not junk.
     
    netlasher, Jan 18, 2008 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    Well you'd need to post your actual code.
     
    nico_swd, Jan 18, 2008 IP
  3. netlasher

    netlasher Banned

    Messages:
    112
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    code

    i keep on getting a error on the same line as delete2.php

    <?php do { ?>
    <tr>
    <td><?php echo $row_Recordset1['DUE']; ?></td>
    <td><?php echo $row_Recordset1['PROJECT NAME']; ?></td>
    <td><?php echo $row_Recordset1['CONTACT']; ?></td>
    <td><?php echo $row_Recordset1['PLANS']; ?></td>
    <td><?php echo $row_Recordset1['ADD']; ?></td>
    <td><?php echo $row_Recordset1['NOTES']; ?></td>
    <td><a href="delete2.php?recordID=<?php echo $row_ Recordset1 ['PROJECT NAME']; ?>">Delete</a></td>
    </tr>
    <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
     
    netlasher, Jan 18, 2008 IP
  4. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #4
    Is there a specific reason you're using a do/while loop? Usually a normal while loop is best in this case. (Unless you need it for a reason we don't know about)

    Also, please include the exact error message. Your code looks good so far.
     
    nico_swd, Jan 18, 2008 IP
  5. netlasher

    netlasher Banned

    Messages:
    112
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/dfghsdf/public_html/grid2/delete.php on line 85
     
    netlasher, Jan 18, 2008 IP
  6. netlasher

    netlasher Banned

    Messages:
    112
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    I was just following the dreamweaver docs
     
    netlasher, Jan 18, 2008 IP
  7. netlasher

    netlasher Banned

    Messages:
    112
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
  8. netlasher

    netlasher Banned

    Messages:
    112
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    This my whole page.. I can get the insert, the view, login, and update pages fine.. its just the delete page i am getting problems with.. here is my whole page for the delete page..

    <?php require_once('../Connections/dfs4.php'); ?>
    <?php
    mysql_select_db($database_dfs4, $dfs4);
    $query_Recordset1 = "SELECT * FROM bids";
    $Recordset1 = mysql_query($query_Recordset1, $dfs4) or die(mysql_error());
    $row_Recordset1 = mysql_fetch_assoc($Recordset1);
    $totalRows_Recordset1 = mysql_num_rows($Recordset1);
    ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Untitled Document</title>
    <style type="text/css">
    <!--
    .style3 { font-family: Arial;
    font-size: 24px;
    font-weight: bold;
    }
    .style4 { font-family: Arial;
    font-size: 14px;
    }
    -->
    </style>
    </head>

    <body>
    <div align="center">
    <table width="860" border="0" cellpadding="0" cellspacing="0">
    <!--DWLayoutTable-->
    <tr>
    <td width="4" rowspan="3" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
    <td height="21" colspan="2" valign="top"><span class="style4"><a href="view.php">View Bids</a> - <a href="insert.php">Insert Bids</a> - <a href="update.php">Update Bids</a> - <a href="delete.php">Delete Bids</a> - Logout </span></td>
    <td width="4" rowspan="2" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
    <td width="4"></td>
    </tr>
    <tr>
    <td colspan="2" rowspan="3" valign="top"><span class="style3">Bid Administration</span></td>
    <td height="30"></td>
    </tr>

    <tr>
    <td height="25">&nbsp;</td>
    <td></td>
    </tr>





    <tr>
    <td height="12"></td>
    <td></td>
    <td></td>
    </tr>
    <tr>
    <td height="38">&nbsp;</td>
    <td width="92">&nbsp;</td>
    <td valign="top">&nbsp;</td>
    <td valign="top">&nbsp;</td>
    <td valign="top">&nbsp;</td>
    </tr>

    <tr>
    <td height="137">&nbsp;</td>
    <td>&nbsp;</td>
    <td width="795">&nbsp;
    <table border="1">
    <tr>
    <td width="120">DUE</td>
    <td width="70">PROJECT NAME</td>
    <td width="164">CONTACT</td>
    <td width="139">PLANS</td>
    <td width="122">ADD</td>
    <td width="140">NOTES</td>
    <td width="39">&nbsp;</td>
    </tr>
    <?php do { ?>
    <tr>
    <td><?php echo $row_Recordset1['DUE']; ?></td>
    <td><?php echo $row_Recordset1['PROJECT NAME']; ?></td>
    <td><?php echo $row_Recordset1['CONTACT']; ?></td>
    <td><?php echo $row_Recordset1['PLANS']; ?></td>
    <td><?php echo $row_Recordset1['ADD']; ?></td>
    <td><?php echo $row_Recordset1['NOTES']; ?></td>
    <td><a href="delete2.php?recordID=<?php echo $row_ Recordset1 ['PROJECT NAME']; ?>">Delete</a></td>
    </tr>
    <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
    </table></td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    <tr>
    <td height="516">&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    </tr>
    </table>
    </div>
    </body>
    </html>
    <?php
    mysql_free_result($Recordset1);
    ?>
     
    netlasher, Jan 18, 2008 IP
  9. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #9
    Okay, took me a moment to spot that, but there's a white space between $row and Recordset1, in the line with the delete link.
     
    nico_swd, Jan 18, 2008 IP
  10. netlasher

    netlasher Banned

    Messages:
    112
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #10
    omg... hahaha


    I'm not gay.... but man i love you i been going over this for hours.. thinking man what am i doing wrong.. YESS.. It works great!

    Umm Web hosting account.. where do you want me to send the username and password? and do you have a website you want to use to sign up with?
     
    netlasher, Jan 18, 2008 IP
  11. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #11
    No worries mate. Thanks for the offer, but I have more than enough web hosts. :p

    Or does yours offer something amazingly special that no one else offers? Then I'd think about it, lol.
     
    nico_swd, Jan 18, 2008 IP
  12. netlasher

    netlasher Banned

    Messages:
    112
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #12
    What exactly are you looking for?

    What are some of your sites? I could link them to other sites...
     
    netlasher, Jan 18, 2008 IP
  13. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #13
    nico_swd, Jan 18, 2008 IP
  14. netlasher

    netlasher Banned

    Messages:
    112
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #14
    Hey thanks again for your help.. I added you on my friends site links page - http://solenex.com/links.php The web hosting package offer is still open.. You just let me know, and just remind me.
     
    netlasher, Jan 19, 2008 IP
  15. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #15
    Thanks for the links. :)

    And thanks again. Perhaps I'll come back to that.
     
    nico_swd, Jan 19, 2008 IP
Thread Status:
Not open for further replies.