douwei7203
douwei7203
2011-10-25 19:50

如何由随机用户自动提交表单?

已采纳

im using Drupal,

im comparing two fields, when the fields are true I want the form being viewed to submit, but by a different user to the one viewing the form.

I get list of users by uid, maybe using the following code

$submitter = db_result(db_query('SELECT uid FROM {bidtable} WHERE nid = %d', $node->nid ORDER BY rand ));

then I compare 2 values

if ($match < $bcd) {}

but i need some code which will submit the form, and set the author or submitter to a random user from my table.

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答

为你推荐