Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
6 - 1 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
     
prefix("cervex_config")."(location, value) VALUES('config', 1)";[/code] This is the first module I'm creating, I know I do something wrong, but I don't know how I must do it.. Anyone who sees what goes wrong?? (sorry for my English) Greets Corne edit: Is there a tutorial or something for working with a database from XOOPS modules? Or does someone have an simple example?[/quote]" />

Re: My own module
by phillipd on 2005/1/13 21:39:13

That works great, thanks!

Doug P
Re: My own module
by ejuden01 on 2005/1/13 21:29:12

Instead of calling $xoopsDB->query(), call $xoopsDB->queryF()
Re: My own module
by phillipd on 2005/1/13 21:26:17

Is there a way to avoid this security issue, in a secure manner, of not allowing a insert,update,delete from a GET? I need to possibly do a insert when a user hits a page depending on if something exists in the DB. How would I do this?

Thanks

Doug P
Re: My own module
by ackbarr on 2005/1/12 16:26:59

as a matter of protection, XOOPS blocks any INSERT, UPDATE, or DELETE queries if the page was accessed via a GET request.
Only pages accessed via a POST request (a form submission) can modify the database.
Re: My own module
by ejuden01 on 2005/1/12 15:47:21

When I do mine, I use sprintf:
le="color: #000000"><?php $sql = sprintf("INSERT INTO %s VALUES (%s, %u)", $xoopsDB->prefix("cervex_config"), 'config', 1); $xoopsDB->query($sql);

Who's Online

528 user(s) are online (346 user(s) are browsing Support Forums)


Members: 0


Guests: 528


more...

Donat-O-Meter

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

Latest GitHub Commits