1
rom669
xoops_confirm
  • 2005/4/21 14:30

  • rom669

  • Just popping in

  • Posts: 3

  • Since: 2005/4/15


hi !
can someone explain to me or give me some links for how to use the function
xoops_confirm () ?
I don't understand the parameter to give...

thanks in advance

2
ackbarr
Re: xoops_confirm

xoops_confirm is defined in /include/functions.php as:

function xoops_confirm($hiddens$action$msg$submit='')


$hiddens - an array containing name/value pairs for any hidden variables needing to be sent along with the confirmation
$action - the path to the script to go to after confirmation
$msg - The message to display to the user
$submit - (optional) the text to display on the submit button. If omitted, uses the XOOPS language constant _SUBMIT

$hiddens is probably the most confusing of the bunch, maybe it will be clearer with an example.

Let's say you are writing code to remove a category from your module. You want the user to confirm this deletion, and run the deletion code. In order to remove this category, your script needs to know the category ID to be removed. xoops_confirm might then be called like this:

xoops_confirm(array('categoryid'=>$categoryid), 'catdelete.php'"Are you sure you want to remove category #$categoryid ?");

Login

Who's Online

118 user(s) are online (91 user(s) are browsing Support Forums)


Members: 0


Guests: 118


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Dec 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits