Mineshrai
Forum Replies Created
-
@bcworkz Thanks for ur help… But there is no issue of
max_file_uploads
Since when I add 4 or more images and keep the other fields blank. It gets inserted in database. The only issue is when all the fields are filled and they are 4 or more than 4 then the problem occurs.I just want to insert name of the image files in database. there is no issue to insert these images on Hosting.
@bcworkz
var_dump();
is displaying properly, but the data is not getting inserted… Following is the result ofvar_dump();
{"member_image":["oro-2.png","oro-blue.png","oro-Copy.png","oro-Copy-2.jpg","oro.jpg"],"member_name":["cdnwjk","bchwj","cbhdwb","cbhdwk","nvjrl"],"member_email":["xgquj","bhwbbch","bchidqk","bchkwd","njcvlw"],"member_role":["cxdwj","bchw","bchkwd","nvrjl","njllj"],"member_fb":["cbhdw","bhwck","cbhdwk","nvjlr","njklbjk"]}
When I add 3 fields, means when I add upto 3 images it works fine, the data gets inserted. But when I add 4th image nothing gets inserted.
Forum: Plugins
In reply to: [Simple User Avatar] Default avatar is not appearingHi @nootkan,
I have not checked whether the plugin is updated or not. But if you want this feature you have to modify the code in the index.php file available in the plugin folder.Note: Beware that if the plugin gets any update in future, the changes you have made will be lost…
- This reply was modified 7 years ago by Mineshrai.
@techdancer thanks… I think the problem is with image id.. But I am unable to modify the code… Plz help..
Forum: Developing with WordPress
In reply to: wp_insert_post is not creating revision in databaseI added
wp_save_post_revision( int $post_id )
afterwp_insert_post
. Now working fine…Forum: Developing with WordPress
In reply to: wp_insert_post is not creating revision in databaseCreating revisions is the default feature of wp_insert_post???
Forum: Developing with WordPress
In reply to: wp_insert_post is not creating revision in databaseHi @t-p Thanks,
I don’t want to use plugin…
Big Thanks @saltennys It works great… ??
Thanks for ur answer.
I have updated my code as follows it is working fine but there is one big problem, it is displaying only first three values…Plz help…
<?php $project_id = $_SESSION['project_id']; $query = $wpdb->prepare( "SELECT reward_details FROM wpxa_orocox_rewards WHERE project_id = %d", $project_id ); $string = $wpdb->get_var( $query ); $someArray = json_decode( $string, true ); $count = count( $someArray ); for ( $i = 0; $i < $count; $i++ ) { ?> <div class="panel panel-default"> <div class="panel-body"> <?php echo $someArray['reward_title'][$i]; ?> </div> </div> <?php } ?>
Forum: Developing with WordPress
In reply to: How to Update multiple rows using $wpdb->updateHi @jakept Thanks,
But some how I m not getting exactly what to do. Can u plz elaborate…Forum: Developing with WordPress
In reply to: How to Update multiple rows using $wpdb->update@rossmitchell Thanks.
I will update the code with “prepare”. But my problem still exists.. Plz help..
Thanks. Problem is solved. I have done following changes in the code and it works. But another problem arised.
Everytime on inserting the data an additional blank row is automatically created. What to do. Also when I use
stripslashes( strip_tags($_POST['reward_title']);
to sanitize the code is not working.Plz help
function insert_in_database_reward_table() { if( isset( $_POST['submit_project'] ) && ! empty($_POST['reward_title']) ) { foreach ( $_POST['reward_title'] as $value) { $test = $value; global $wpdb; $result = $wpdb->insert( 'wpxa_oro_rewards', array( 'project_id' => '67', 'reward_title' => $test ), array( '%d', '%s' ) ); }}} add_action( 'init', 'insert_in_database_reward_table');
- This reply was modified 7 years, 2 months ago by Mineshrai.
@swansonphotos,
Thanks for ur reply. I don’t want any plugin for this setup. Can u plz share any code.@bcworkz Plz help. Thanks