Jump to content

posting user_id from custom form submission?


kemper

Recommended Posts

Not really sure I understand your problem. From what I get, you want to identify a user in the form.php so that you can determine which user is accessing the form.php. Is that correct?

 

If so, you could just put in form.php

$user_id=isset($_POST['userid'])?$_POST['userid']:'';
if ($user_id!='')
  {
  echo '<form';//complete the form
  echo '<input type="hidden" name="userid" value="'.$user_id.'">';
  echo '</form';
  }
else echo 'Please Login';

Where does this go?

 

you mean where to put the code?

 

In the form.php.

 

You basically want php to create a dynamic hidden <input> tag. Put it between <form></form>

 

How about you paste here the code of the form.php between the <form></form>. We can then "fix" the code for you easily.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.