ag3nt42 Posted July 3, 2008 Share Posted July 3, 2008 hello again all, :'( I have a lil bit of a problem... I have a script written out that collects information about a company.. stores it in the database then upon return to the form displays the company name below along with a delete button. now the process of submitting the information is going perfectly ... the problem is with the delete.. I use this EXACT same process on another form that I allow users to setup Client types.. and that form works perfectly... submit and delete... I've went over the code for the current form i'm working on and I can't find anything wrong with... hopefully you guys can... I'll warn you now this is not just a little bit of code... so without further adue lets get to it... THE HTML FORM: ClientInfo.php: <?php session_start(); require('../../config.php'); ///////////////////////////////// //*****************************// //***** L.O.T.U.S. AUTHOR *****// //****** AG3NT42 ******// //*****************************// //////////////////////////////// //* OPEN DATABASE CONNECTION *// //////////////////////////////// $con = mssql_connect($dblocation,$dbusername,$dbpassword); if (!$con) { die('Could not connect: ' . mssql_error()); } mssql_select_db($dbname, $con); //* STOP THE BITCHING *// $Ctype= array('','','','',''); //* SNATCH CTYPES *// $datatable=$tblpre."ClientType"; $CtypeSQL="SELECT [Type] FROM [".$datatable."] ORDER BY Type"; $result=mssql_query($CtypeSQL)or die(mssql_error()); $count=mssql_num_rows(mssql_query($CtypeSQL)); $y=0; while($row=mssql_fetch_row($result)) { $Ctype[$y]=$row[0]; $y++; } //* DISPLAY INTERFACE *// echo(" <html> <head> <link rel='stylesheet' type='text/css' href='../admin.css' /> </head> <body> <table> <tr> <td><h1>Client Information</h1></td> </tr> <tr> <td> <fieldset><legend>Client Information</legend> <form action='../Ca_info/Cci_info.php' method='post'> <table> <tr> <td style='width:50%;text-align:right'><label>CompanyName: </td> <td style='width:50%;text-align:left'><input type='text' name='Cname' value='' /></td> </tr> <tr> <td style='width:50%;text-align:right'><label>Type: </label></td> <td style='width:50%;text-align:left'> <select name='Ctype'> "); //MAKE TYPE DROP DOWN for($x=0;$x<=$count;$x++) { if($Ctype[$x]=='') { echo(''); } else { echo(" <option value='Type".$Ctype[$x]."'>".$Ctype[$x]."</option>".PHP_EOL); } } echo(" </select> </td> </tr> <tr> <td style='width:50%;text-align:right'><label>Address: </label></td> <td style='width:50%;text-align:left'><input type='text' name='Addy' value='' /></td> </tr> <tr> <td style='width:50%;text-align:right'><label>Address2: </label></td> <td style='width:50%;text-align:left'><input type='text' name='Addy2' value='' /></td> </tr> <tr> <td style='width:50%;text-align:right'><label>City: </label></td> <td style='width:50%;text-align:left'><input type='text' name='City' value='' /></td> </tr> <tr> <td style='width:50%;text-align:right'><label>State: </label></td> <td style='width:50%;text-align:left'><input type='text' size='2' maxlength='2' name='State' value='' /></td> </tr> <tr> <td style='width:50%;text-align:right'><label>Zip: </label</td> <td style='width:50%;text-align:left'><input type='text' size='5' maxlength='5' name='Zip' value='' /></td> </tr> <tr> <td colspan='2'> </td> </tr> <tr> <td colspan='2'><h3>Client Contact Infomation</h3></td> </tr> <tr> <td style='width:50%;text-align:right'><label>First Name: </label></td> <td style='width:50%;text-align:left'><input type='text' name='Fname' value='' /></td> </tr> <tr> <td style='width:50%;text-align:right'><label>Last Name: </label></td> <td style='width:50%;text-align:left'><input type='text' name='Lname' value='' /></td> </tr> <tr> <td style='width:50%;text-align:right'><label>Phone#: </label></td> <td style='width:50%;text-align:left'><input type='text' name='Phone' value='' /></td> </tr> <tr> <td style='width:50%;text-align:right'><label>Email: </label></td> <td style='width:50%;text-align:left'><input type='text' name='Email' value='' /></td> </tr> <tr> <td colspan='2'> </td> </tr> <tr> <td style='width:50%;text-align:right'><input type='reset' value='Reset' /></td> <td style='width:50%;text-align:left'><input type='submit' value='Submit' /></td> </tr> </table> </form> </fieldset> </td> </tr> </table> <div class='TypeScroll'> <table> "); //!!!!!!!!!!!!!!!!!!!!!! THE SECTION BELOW IS OUR PROBLEMATIC SECTION !!!!!!!!!! //!!!!!!!!!!!!!!!!!!!!!! IT DISPLAYS CURRENTLY AVAILABLE CLIENTS ALONG WITH A DELETE OPTION !!!!!!!!!! //////////////////////// //* SNATCH AVAILABLE *// //////////////////////// //* STOP THE BITCHING *// $Z=array('','','','',''); $database=$tblpre."ClientInfo"; $SQL="SELECT * FROM [".$database."] ORDER BY Company"; $result=mssql_query($SQL)or die(mssql_error()); $count=mssql_num_rows(mssql_query($SQL)); $y=0; while($row=mssql_fetch_row($result)) { $ID=$row[0]; $Cname=$row[1]; $xCtype=$row[2]; $Addy=$row[3]; $Addy2=$row[4]; $City=$row[5]; $State=$row[6]; $Zip=$row[7]; $Fname=$row[8]; $Lname=$row[9]; $Phone=$row[10]; $Email=$row[11]; $y++; echo(" <tr> <td width='50%' style='text-align:right;'>".$Cname." <form action='../Ca_info/Cci_info.php' method='post'> <input type='hidden' value='".$Cname."' name='Cname".$y."' /> <input type='hidden' value='".$xCtype."' name='Ctype".$y."' /> <input type='hidden' value='".$Addy."' name='Addy".$y."' /> <input type='hidden' value='".$Addy2."' name='Addy2".$y."' /> <input type='hidden' value='".$City."' name='City".$y."' /> <input type='hidden' value='".$State."' name='State".$y."' /> <input type='hidden' value='".$Zip."' name='Zip".$y."' /> <input type='hidden' value='".$Fname."' name='Fname".$y."' /> <input type='hidden' value='".$Lname."' name='Lname".$y."' /> <input type='hidden' value='".$Phone."' name='Phone".$y."' /> <input type='hidden' value='".$Email."' name='Email".$y."' /> </td> <td width='50%' style='text-align:left;'> <input type='submit' value='Delete' /> </form> </td> </tr> <tr> <td colspan='2'> </td> </tr> "); } //* IF NONE ARE AVAILABLE *// if($count<=0) { echo("<tr>".PHP_EOL."<td>No Currently Available Types</td>".PHP_EOL."</tr>".PHP_EOL); } else { echo(""); } echo("</table>".PHP_EOL."</div>".PHP_EOL."</table>".PHP_EOL."</body>".PHP_EOL."</html>"); ?> </table> </div> </body> </html> and here is the processing page: Process.php: <?php session_start(); require('../../config.php'); /////////////////////// //* OPEN CONNECTION *// /////////////////////// $con = mssql_connect($dblocation,$dbusername,$dbpassword); if (!$con) { die('Could not connect: ' . mssql_error()); } mssql_select_db($dbname, $con); /////////////////////////////////// //*******************************// //* Snatch Database Information *// //*******************************// /////////////////////////////////// $database=$tblpre."ClientType"; //CNAME $CnameSQL="SELECT * FROM [".$database."]"; $Cnameresult=mssql_query($CnameSQL)or die(mssql_error()); $y=0; $count=mssql_num_rows(mssql_query($CnameSQL)); while($row=mssql_fetch_row($Cnameresult)) { $ZCname[$y]=$row[0]; $y++; } /////////////////////////////// //////////////////////////// //***************************// //************************// //* HARVEST INPUT VARIABLES *// and //* Setup SQL Variables *// //***************************// //************************// /////////////////////////////// //////////////////////////// //SUBMITTING if(!(isset($_POST['Cname']))){$Delete='Yes';$xCname='';}else{$Delete='No';$xCname=$_POST['Cname'];} if(!(isset($_POST['Ctype']))){$Delete='Yes';$xCtype='';}else{$Delete='No';$xCtype=$_POST['Ctype'];} if(!(isset($_POST['Addy']))){$Delete='Yes';$xAddy='';}else{$Delete='No';$xAddy=$_POST['Addy'];} if(!(isset($_POST['Addy2']))){$Delete='Yes';$xAddy2='';}else{$Delete='No';$xAddy2=$_POST['Addy2'];} if(!(isset($_POST['City']))){$Delete='Yes';$xCity='';}else{$Delete='No';$xCity=$_POST['City'];} if(!(isset($_POST['State']))){$Delete='Yes';$xState='';}else{$Delete='No';$xState=$_POST['State'];} if(!(isset($_POST['Zip']))){$Delete='Yes';$xZip='';}else{$Delete='No';$xZip=$_POST['Zip'];} if(!(isset($_POST['Fname']))){$Delete='Yes';$xFname='';}else{$Delete='No';$xFname=$_POST['Fname'];} if(!(isset($_POST['Lname']))){$Delete='Yes';$xLname='';}else{$Delete='No';$xLname=$_POST['Lname'];} if(!(isset($_POST['Phone']))){$Delete='Yes';$xPhone='';}else{$Delete='No';$xPhone=$_POST['Phone'];} if(!(isset($_POST['Email']))){$Delete='Yes';$xEmail='';}else{$Delete='No';$xEmail=$_POST['Email'];} //DELETING //*STOP THE BITCHING*// $Cname=array(); $Ctype=array(); $Addy=array(); $Addy2=array(); $City=array(); $State=array(); $Zip=array(); $Fname=array(); $Lname=array(); $Phone=array(); $Email=array(); //The Table+Prefix $datatable=$tblpre."ClientInfo"; //*CNAME*// //COLLECT DELETE INPUT for($x=1;$x<=$count;$x++) { if(!(isset($_POST['Cname'.$x]))){$Cname[$x]='';}else{$Cname[$x]=$_POST['Cname'.$x];} //SQL VARIABLE MUST BE SET HERE FOR X TO BE CORRECT $CnameDelete[$x]="DELETE FROM [".$datatable."] WHERE Company='".$Cname[$x]."'"; echo($Cname[$x]); } //*CTYPE*// //COLLECT DELETE INPUT for($x=1;$x<=$count;$x++) { if(!(isset($_POST['Ctype'.$x]))){$Ctype[$x]='';}else{$Ctype[$x]=$_POST['Ctype'.$x];} //SQL VARIABLE MUST BE SET HERE FOR X TO BE CORRECT $CtypeDelete[$x]="DELETE FROM [".$datatable."] WHERE Type='".$Ctype[$x]."'"; echo($Ctype[$x]); } //*Addy*// //COLLECT DELETE INPUT for($x=1;$x<=$count;$x++) { if(!(isset($_POST['Addy'.$x]))){$Addy[$x]='';}else{$Addy[$x]=$_POST['Addy'.$x];} //SQL VARIABLE MUST BE SET HERE FOR X TO BE CORRECT $AddyDelete[$x]="DELETE FROM [".$datatable."] WHERE Addy='".$Addy[$x]."'"; echo($Addy[$x]); } //*Addy2*// //COLLECT DELETE INPUT for($x=1;$x<=$count;$x++) { if(!(isset($_POST['Addy2'.$x]))){$Addy2[$x]='';}else{$Addy2[$x]=$_POST['Addy2'.$x];} //SQL VARIABLE MUST BE SET HERE FOR X TO BE CORRECT $Addy2Delete[$x]="DELETE FROM [".$datatable."] WHERE Addy2='".$Addy2[$x]."'"; echo($Addy2[$x]); } //*City*// //COLLECT DELETE INPUT for($x=1;$x<=$count;$x++) { if(!(isset($_POST['City'.$x]))){$City[$x]='';}else{$City[$x]=$_POST['City'.$x];} //SQL VARIABLE MUST BE SET HERE FOR X TO BE CORRECT $CityDelete[$x]="DELETE FROM [".$datatable."] WHERE City='".$City[$x]."'"; echo($City[$x]); } //*State*// //COLLECT DELETE INPUT for($x=1;$x<=$count;$x++) { if(!(isset($_POST['State'.$x]))){$State[$x]='';}else{$State[$x]=$_POST['State'.$x];} //SQL VARIABLE MUST BE SET HERE FOR X TO BE CORRECT $StateDelete[$x]="DELETE FROM [".$datatable."] WHERE State='".$State[$x]."'"; echo($State[$x]); } //*Zip*// //COLLECT DELETE INPUT for($x=1;$x<=$count;$x++) { if(!(isset($_POST['Zip'.$x]))){$Zip[$x]='';}else{$Zip[$x]=$_POST['Zip'.$x];} //SQL VARIABLE MUST BE SET HERE FOR X TO BE CORRECT $ZipDelete[$x]="DELETE FROM [".$datatable."] WHERE Zip='".$Zip[$x]."'"; echo($Zip[$x]); } //*Fname*// //COLLECT DELETE INPUT for($x=1;$x<=$count;$x++) { if(!(isset($_POST['Fname'.$x]))){$Fname[$x]='';}else{$Fname[$x]=$_POST['Fname'.$x];} //SQL VARIABLE MUST BE SET HERE FOR X TO BE CORRECT $FnameDelete[$x]="DELETE FROM [".$datatable."] WHERE FirstName='".$Fname[$x]."'"; echo($Fname[$x]); } //*Lname*// //COLLECT DELETE INPUT for($x=1;$x<=$count;$x++) { if(!(isset($_POST['Lname'.$x]))){$Lname[$x]='';}else{$Lname[$x]=$_POST['Lname'.$x];} //SQL VARIABLE MUST BE SET HERE FOR X TO BE CORRECT $LnameDelete[$x]="DELETE FROM [".$datatable."] WHERE LastName='".$Lname[$x]."'"; echo($Lname[$x]); } //*Phone*// //COLLECT DELETE INPUT for($x=1;$x<=$count;$x++) { if(!(isset($_POST['Phone'.$x]))){$Phone[$x]='';}else{$Phone[$x]=$_POST['Phone'.$x];} //SQL VARIABLE MUST BE SET HERE FOR X TO BE CORRECT $PhoneDelete[$x]="DELETE FROM [".$datatable."] WHERE Phone#='".$Phone[$x]."'"; echo($Phone[$x]); } //*Email*// //COLLECT DELETE INPUT for($x=1;$x<=$count;$x++) { if(!(isset($_POST['Email'.$x]))){$Email[$x]='';}else{$Email[$x]=$_POST['Email'.$x];} //SQL VARIABLE MUST BE SET HERE FOR X TO BE CORRECT $EmailDelete[$x]="DELETE FROM [".$datatable."] WHERE Email='".$Email[$x]."'"; echo($Email[$x]); } //* SUBMIT NEW DATA *// $CnameINSERT="INSERT INTO [".$datatable."] (Company, Type, Addy, Addy2, City, State, Zip, FirstName, LastName, Phone#, Email) VALUES ('".$xCname."', '".$xCtype."', '".$xAddy."', '".$xAddy2."', '".$xCity."', '".$xState."', '".$xZip."', '".$xFname."', '".$xLname."', '".$xPhone."', '".$xEmail."')"; //////////////////////////// //************************// //* Start SQL Injections *// //************************// //////////////////////////// $Success=0; $Fail=0; // IF ADDING if($Delete=='No') { if(mssql_query($CnameINSERT)) { echo("<font color='green'>".$xCname."Type Added Successfully!</font><br />"); $Success++; } else { echo("<font color='red'>".$xCname."FAILED</font>".mssql_error()); $Fail++; } } //!!!!!!!!!!!!!!!!!!!!!!!!! PROBLEMATIC SECTION BELOW !!!!!!!!!!!!!!!!!!!!! //IF DELETING elseif($Delete=='Yes') { for($x=1;$x<=$count;$x++) { //DELETE CNAME if($Cname[$x]=="") { echo(''); } else { if(mssql_query($CnameDelete[$x])) { echo("<font color='green'> Client Deleted Successfully!</font><br />"); $Success++; } else { echo("<font color='red'>FAILED</font>".mssql_error()); $Fail++; } } //DELETE CTYPE if($Ctype[$x]=="") { echo(''); } else { if(mssql_query($CtypeDelete[$x])) { echo("<font color='green'> Client Type Deleted Successfully!</font><br />"); $Success++; } else { echo("<font color='red'>FAILED</font>".mssql_error()); $Fail++; } } //DELETE Addy if($Addy[$x]=="") { echo(''); } else { if(mssql_query($AddyDelete[$x])) { echo("<font color='green'> Client Address Deleted Successfully!</font><br />"); $Success++; } else { echo("<font color='red'>FAILED</font>".mssql_error()); $Fail++; } } //DELETE Addy2 if($Addy2[$x]=="") { echo(''); } else { if(mssql_query($Addy2Delete[$x])) { echo("<font color='green'> Client Address2 Deleted Successfully!</font><br />"); $Success++; } else { echo("<font color='red'>FAILED</font>".mssql_error()); $Fail++; } } //DELETE City if($City[$x]=="") { echo(''); } else { if(mssql_query($CityDelete[$x])) { echo("<font color='green'> Client City Deleted Successfully!</font><br />"); $Success++; } else { echo("<font color='red'>FAILED</font>".mssql_error()); $Fail++; } } //DELETE State if($State[$x]=="") { echo(''); } else { if(mssql_query($StateDelete[$x])) { echo("<font color='green'> Client State Deleted Successfully!</font><br />"); $Success++; } else { echo("<font color='red'>FAILED</font>".mssql_error()); $Fail++; } } //DELETE Zip if($Zip[$x]=="") { echo(''); } else { if(mssql_query($ZipDelete[$x])) { echo("<font color='green'> Client Zip Deleted Successfully!</font><br />"); $Success++; } else { echo("<font color='red'>FAILED</font>".mssql_error()); $Fail++; } } //DELETE Fname if($Fname[$x]=="") { echo(''); } else { if(mssql_query($FnameDelete[$x])) { echo("<font color='green'> Client FirstName Deleted Successfully!</font><br />"); $Success++; } else { echo("<font color='red'>FAILED</font>".mssql_error()); $Fail++; } } //DELETE Lname if($Lname[$x]=="") { echo(''); } else { if(mssql_query($LnameDelete[$x])) { echo("<font color='green'> Client LastName Deleted Successfully!</font><br />"); $Success++; } else { echo("<font color='red'>FAILED</font>".mssql_error()); $Fail++; } } //DELETE Phone if($Phone[$x]=="") { echo(''); } else { if(mssql_query($PhoneDelete[$x])) { echo("<font color='green'> Client Phone# Deleted Successfully!</font><br />"); $Success++; } else { echo("<font color='red'>FAILED</font>".mssql_error()); $Fail++; } } //DELETE Email if($Email[$x]=="") { echo(''); } else { if(mssql_query($EmailDelete[$x])) { echo("<font color='green'> Client Email Deleted Successfully!</font><br />"); $Success++; } else { echo("<font color='red'>FAILED</font>".mssql_error()); $Fail++; } } } } if($Success<=0) {//NOTHING echo(''); } elseif($Fail<=0) {//REDIRECT echo("<meta http-equiv='refresh' content='3;url=http://".$domain.$sPath."admin/Edits/Clients.php'>"); } ?> Quote Link to comment Share on other sites More sharing options...
dannyb785 Posted July 3, 2008 Share Posted July 3, 2008 dude... sorry but... uh.... this is the kinda thing I'd expect from my clients... that they'd be paying me to answer. So much code... yikes... there's gotta be an easier way to do what you're doing.... Quote Link to comment Share on other sites More sharing options...
teynon Posted July 3, 2008 Share Posted July 3, 2008 Try describing the problem. Just saying it isn't working doesn't tell me anything. Is it giving an error? Create a scenario don't just throw code at me. Quote Link to comment Share on other sites More sharing options...
ag3nt42 Posted July 3, 2008 Author Share Posted July 3, 2008 sry guys I was trying to edit my post cuz I noticed I forgot to say the exact problem... hehe but its so much code it crashed my browser and my desktop haha... its roughly 600+ lines of code heheh... basically the problem is that when I hit delete it is deleting all of the clients not just the one client. Quote Link to comment Share on other sites More sharing options...
ag3nt42 Posted July 3, 2008 Author Share Posted July 3, 2008 dude... sorry but... uh.... this is the kinda thing I'd expect from my clients... that they'd be paying me to answer. So much code... yikes... there's gotta be an easier way to do what you're doing.... well i'm not going to pay you so.. hey if there's an easier way let me know saves me some headache ps.. its not really that much code when you break it all down... there is alot of repeated code because of the quantity of information I'm collecting... this is not just a lil website form this is a tiny part of a massive web app. Quote Link to comment Share on other sites More sharing options...
grimmier Posted July 3, 2008 Share Posted July 3, 2008 does your database table have a UNIQUE ID for each client? besides name if it has a unique id then i would use that to pick only that one client and delete it. Quote Link to comment Share on other sites More sharing options...
discomatt Posted July 3, 2008 Share Posted July 3, 2008 The issue is in your delete query. $q = "DELETE FROM `table` WHERE `id` = $id LIMIT 1"; Quote Link to comment Share on other sites More sharing options...
teynon Posted July 3, 2008 Share Posted July 3, 2008 Well from what I read, which I am not going to read through all of it, it appears you are deleting someone based off of a field called "addy" which I'm assuming is an address or something like that. Now if the address field is empty, it is going to delete everyone. This is why you need to have keys in your database. Each entry should have a unique key, which MYSQL will do by itself. Heres how it is generically: ID int(10) auto_increment PRIMARY KEY(ID) Once you have an ID, each field selected to be deleted should be called that way in the SQL. For example "DELETE FROM `TABLE` WHERE `ID` = VALUE;" Having it as a key ensures there is only one of that exact copy in the database and you can specifically point out which one should be removed. Think of it as a social security number for your fields. Quote Link to comment Share on other sites More sharing options...
ag3nt42 Posted July 3, 2008 Author Share Posted July 3, 2008 I do have a primary key I sposed I could use that to delete everything but being that I will never know what that number is I neglect to use it. so you guys are saying that I should basically do a DELETE * FROM [table] WHERE ID='".$id."' LIMIT 1 <I'm assuming this stops it from deleting more the 1 entry? Quote Link to comment Share on other sites More sharing options...
discomatt Posted July 3, 2008 Share Posted July 3, 2008 Yes... when the user clicks the delete link, it should be something like 'delete.php?id=xx' where xx is the ID grabbed from the database for that entry. Then simply use if ( is_numeric( $_GET['id'] ) ) mysql_query( "DELETE * FROM [table] WHERE ID = $id" ); Quote Link to comment Share on other sites More sharing options...
ag3nt42 Posted July 3, 2008 Author Share Posted July 3, 2008 i'm trying what you guys said but now i keep getting this error Notice: Uninitialized string offset: 1 in x on line 83 Quote Link to comment Share on other sites More sharing options...
ag3nt42 Posted July 3, 2008 Author Share Posted July 3, 2008 I think the above is referencing to a syntax error but I cannot find it... just got here so gimme a min and I'll post the code Quote Link to comment Share on other sites More sharing options...
ag3nt42 Posted July 3, 2008 Author Share Posted July 3, 2008 nvrm couldn't get my ftp working... see ya mon...happy 4th Quote Link to comment Share on other sites More sharing options...
trq Posted July 3, 2008 Share Posted July 3, 2008 Why don't you post the relevent parts of code? Quote Link to comment Share on other sites More sharing options...
ag3nt42 Posted July 5, 2008 Author Share Posted July 5, 2008 i will but its the 4th of july... and my ftp isn't working.. so I figured we'd recap on mon Quote Link to comment Share on other sites More sharing options...
ag3nt42 Posted July 7, 2008 Author Share Posted July 7, 2008 ok well I think I got it working guys... I just changed the starting number for x to 1 instead of 0 and its working fine now.. unchanged: for($x=0;$x<=$count;$x++) { if(!(isset($_POST['ID'.$x]))){$ID[$x]='';}else{$ID[$x]=$_POST['ID'.$x];} if(!(isset($_POST['Cname'.$x]))){$Cname[$x]='';}else{$Cname[$x]=$_POST['Cname'.$x];} //SQL VARIABLE MUST BE SET HERE FOR X TO BE CORRECT $CnameDelete[$x]="DELETE FROM [".$datatable."] WHERE ID='".$ID[$x]."'"; echo($Cname[$x]); } changed: for($x=1;$x<=$count;$x++) { if(!(isset($_POST['ID'.$x]))){$ID[$x]='';}else{$ID[$x]=$_POST['ID'.$x];} if(!(isset($_POST['Cname'.$x]))){$Cname[$x]='';}else{$Cname[$x]=$_POST['Cname'.$x];} //SQL VARIABLE MUST BE SET HERE FOR X TO BE CORRECT $CnameDelete[$x]="DELETE FROM [".$datatable."] WHERE ID='".$ID[$x]."'"; echo($Cname[$x]); } thankx guys, ag3nt Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.