Hi. maybe this is another yet simple question about form, php and drupal.
I am working with this code in local machine and the code is working, but problem occurs when i hosted it. Nothing happen, the database still empty. I'm looking around for the same problem but i cant find it. Anyone can help me please?
is there any code should i add when i use different database?
----------
User Code |
|
User Name |
|
Defintion |
|
|
|
<?php
if(isset($user_code)){
if (isset($_POST['submit'])) {
include '/includes/config.inc';
$user_code = isset($_POST['user_code']) ? $_POST['user_code'] : NULL;
$user_name = isset($_POST['user_name']) ? $_POST['user_name'] : NULL;
$def = isset($_POST['def']) ? $_POST['def'] : NULL;
$insert = "INSERT INTO user(user_code,user_name,def) VALUES ('$user_code','$user_name','$def')";
mysql_query($insert) or die ("cannot inser data into tabel");
echo "Input has been done";
}
}else{