OK, all I'm trying to do is to capture the input of one form field and add it to another hidden field. What I'm trying to do is create a Lead ID out of the company name combined with some date and time information. I can pull in the date and time information using the code shown in the hidden field below, but have no idea how to capture the input of the 'Company' field. <form method=POST action=""> <input type=hidden name="Lead_ID" value="_<?php echo date("gdmy"); ?>""> <table border="0" cellspacing="0" cellpadding="3"> <tr><td align="left" >Name</td> <td align=left type="text" name="name" ></td></tr> <tr><td align="left" >Company</td> <td align=left><input type="text" name="company" ></td></tr> <tr><td colspan=2 align="left"> <input type=submit value="Submit"></td></tr> </table> </form> Code (markup): Anyone got any ideas how to do this ?
Do the lead ID after the post instead of before it and use something like. $lead_id = $_POST['company'] . date("gdmy",time()); PHP:
What do you mean by "do the lead ID after the post instead of before it" I've tried this with no success : the lead_ID appears blank : <form method=POST action=""> <input type=hidden name="Lead_ID" value="_<?php echo date("gdmy"); ?>""> <table border="0" cellspacing="0" cellpadding="3"> <tr><td align="left" >Name</td> <td align=left type="text" name="name" ></td></tr> <tr><td align="left" >Company</td> <td align=left><input type="text" name="company" ></td></tr> <tr><td colspan=2 align="left"> <input type=submit value="Submit"></td></tr> </table> <?php $lead_id = $_POST['company'] . date("gdmy",time()); ?> </form> Code (markup):
It should work, try echoing the $lead_id, I don't see why it wouldn't output: "companynameTIMEstuff". Try this: <form method=POST action=""> <input type=hidden name="Lead_ID" value="_<?php echo date("gdmy"); ?>""> <table border="0" cellspacing="0" cellpadding="3"> <tr><td align="left" >Name</td> <td align=left type="text" name="name" ></td></tr> <tr><td align="left" >Company</td> <td align=left><input type="text" name="company" ></td></tr> <tr><td colspan=2 align="left"> <input type=submit value="Submit"></td></tr> </table> <?php $lead_id = $_POST['company'] . date("gdmy",time()); echo $lead_id; ?> </form> Code (markup):