php - Getting the the input value after focus out -


i want add number of input fields in form depends on value of previous input fields. example: have 2 inputs

if user

1.<tr><td>number of articles/posts/pages:</td><td><input type="number" name="count" ></td></tr>   2.<tr><td>keywords:</td><td><?php  $number_of_keywords=$_post['count']; i="<input type='text' name='keyword'>"; i++; i==$number_of_articles; echo i;         ?></td></tr> 

for example if user type 3 in count field, want show 3 input field. number of input fields depend on how user type in count field.

please tell me if above code work here , how can count field value @ run time?

no, can't count field value @ run time, value must submitted via form or passed parameter in query string, php knows it.

this question more appropriated tagged javascript question, php question. if want @ run time. if strictly using php, have pass count value server somehow, either submitting form, or sending via parameter in query string, have told before.

please take consideration if real code, create n inputs attribute

    name="keyword" 

which not correct , might lot of problems later on.


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -