Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
How to create table and add row
Hello,
sorry I’m pretty php-agnostic, I need to generate a table (if not exists) and insert a row of data coming from a $_POST in the article page. The data would be sanitized, I’m wondering what are the built-in functions to do such a thing…
Thanks!
Offline
Re: How to create table and add row
I’d say
$phonenumber = doSlash(ps('phonenumber'));
$age = doSlash(ps('age'));
$res = safe_insert('txp_mytable', "phonenumber=$phonenumber, age=$age");
For the insert part…
Offline
Re: How to create table and add row
hi Manaus
try the plugin mem_simple_form it will do the job correctly.
Offline
Pages: 1