The following string contains the serialize data of a form. I want to include session_id()
in the same string, so how can I include something like session_id=session_id();
in it? Thanks.
string = '&' + $('#new_form').serialize();
Inside your form tag u can add hidden input element.
<form>
<input type='hidden' name='session_id' value=<?=session_id()?> >
<!-- your other form elements -->
</form>
Now your jquery will automatically add the session_id
I hope this will help :)