PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
i've got a little problem...
i'm actually new in php coding and i can't get some things, some things i can't understand. i'm begging for help for the first time...
i got the code which displays records from database(MySQL) like:
// displaying records
for ($i = 0; $i < count($this->mMessage); $i++)
$this->mMessage[$i]['onclick'] = "index.php?MailAccountID=2&SentMessageID=" . $this->mMessage[$i]['sent_id'];
// end of displaying
// deleting data
if(isset($_POST['Delete']))
{
$query_string = "DELETE FROM sent WHERE sent_id = '$this->mSelectedMessage' AND customer_id = '$this->mCustomer' LIMIT 1";
$result = @mysql_query($query_string);
header("Location: index.php?MailAccountID=2");
exit;
}
// end of this code
and it's working perfectly but it can delete just one record. i want to delete multiple data using checkboxes. actually i already placed them in table where records are being displayed but the don't work...
can someone halp me? i want to have same code but with ability to delete multiple data
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I don't have all your code and so I probably miss something. My proposal to submit a bunch of selected checkboxes to a php script is to use the following attributes in the input tag:
You can't delete data using .tpl files. For that you need .del files.
Hint:
texxarse wrote:i've got a little problem...
i'm actually new in php coding and i can't get some things, some things i can't understand. i'm begging for help for the first time...
Fine, but is that an excuse for not writing a proper subject line?