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.
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)); ?>
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.
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/dfghsdf/public_html/grid2/delete.php on line 85
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--> </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--> </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"> </td> <td></td> </tr> <tr> <td height="12"></td> <td></td> <td></td> </tr> <tr> <td height="38"> </td> <td width="92"> </td> <td valign="top"> </td> <td valign="top"> </td> <td valign="top"> </td> </tr> <tr> <td height="137"> </td> <td> </td> <td width="795"> <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"> </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> </td> <td> </td> </tr> <tr> <td height="516"> </td> <td> </td> <td> </td> <td> </td> <td> </td> </tr> </table> </div> </body> </html> <?php mysql_free_result($Recordset1); ?>
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.
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?
No worries mate. Thanks for the offer, but I have more than enough web hosts. Or does yours offer something amazingly special that no one else offers? Then I'd think about it, lol.
I'm not looking for anything really. I was just asking. And 2 of my sites that need more traffic are: www.procoim.com www.randomsig.net
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.