[Plugin: Exec-PHP] Plugin Exec-php: Can this be used to INSERT info in a table using Forms?
-
Thanks a lot for this great plugin. I have succeeded getting info showed on a page and also getting info inserted in a table when using this code:
<?php
// Connect to the database
require($_SERVER[‘DOCUMENT_ROOT’] . ‘/db_credentials.php’);
$conn = mysql_connect($db_server, $db_user, $db_pass);
mysql_select_db($db_name, $conn);// prepare the SQL query
$sql = “INSERT INTO folkebiblioteker (name, adresse)
VALUES(‘forsoeg’, ‘forsoeg’)”;
// process the query
$result = mysql_query($sql) or die(mysql_error());
?>But can’t get it to functioning when I use Form code for inserting in the table. Isn’t this possible or do I need a Forms plugin and if yes which should I use, please?
- The topic ‘[Plugin: Exec-PHP] Plugin Exec-php: Can this be used to INSERT info in a table using Forms?’ is closed to new replies.