Materialized: Select value not passed in post body

If you are using the materialize framework, you might have trouble to pass a value when using the select element in a form. Indeed the value is not taken into account. To solve this give an id to the select element and and add an hidden input field with the relevant field name and id as so:

<div class="row">             
<div class="input-field col s12">
<select id="data_select">
<option value="" disabled selected>Data</option> <option value="1">data 1</option>
<option value="2">data 2</option>
<option value="3">data 3</option> <option value="4">data 4</option> </select>
<input type="hidden" name="data_name" id="data_hidden" /> </div>
</div>

and with the associated script:

// Post Materialize select value$(document).ready(function() {
$('#data_select').on('change', function() {
var data_select=document.getElementById("data_select").value;
document.getElementById("data_hidden").value=data_select;

});

[Edit: everything worked fine simply using the following code:

<div class="row">             
<div  class="input-field col s12">                 
<select name="data_name"  id="data_select">                   
<option  value="" disabled selected>Data</option>                   <option  value="1">data 1</option>                   
<option  value="2">data 2</option>                   
<option  value="3">data 3</option>                  
<option  value="4">data 4</option>                 
</select>                 
</div>                       
</div>

]

WAMP Syntax error in INSERT INTO statement

Error : Syntax error in INSERT INTO statement

You might be using some reserved words as the table name.

Based on that article: https://support.microsoft.com/en-gb/help/892608/you-may-receive-a-syntax-error-in-insert-into-statement-error-message.

I tested by changing the name of the table from “orders” to orders_table and it solved the issue. I conclude that orders might be a reserved word.

Solution: change the table name to something else as illustrated above.

WP Plugins or Themes Update error: “Destination directory for file streaming does not exist or is not writable “

Check in wp-config.php which folder is assigned as the temporary directory. the line will start with

  
define('WP_TEMP_DIR', ABSPATH . '/path/to/temp');

Through ftp check the permission on the folder. It should be 755.

Even if all seems alright the update might still failed. In my case my wp-config.php is placed outside the public directory altogether. I decided to go with a temp folder also place outside of the public directoy, those I had to modify my wp-config.php (which is placed in its dedicated directory) as follow:

. I decided to go with a temp folder also place outside of the public directoy, those I had to modify my wp-config.php (which is placed in its dedicated directory) as follow:

define('WP_TEMP_DIR', ABSPATH . '/../temp/');

The path that was causing the error was as follow:

define('WP_TEMP_DIR',dirname(FILE).'/wp-content/uploads');

Placing the wp-config.php outside the public directory allow for an extra layer of security in case the php settings of the apache server get messed up and the php files are exposed instead of being executed. Even though this situation SHOULD NOT happen, there is a possibility that it does and that’s what security is about afterall: being prepared for the unlikely events.