php - basic question about adding data to string -


the following string contains serialize data of form. want include session_id() in same string, how can include session_id=session_id(); in it? thanks.

string = '&' + $('#new_form').serialize(); 

inside form tag u can add hidden input element.

<form>  <input type='hidden' name='session_id' value=<?=session_id()?> >  <!-- other form elements -->  </form> 

now jquery automatically add session_id

i hope :)


Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -