Viewing Id from URL on Page
#11
musicalmidget Wrote:
<input type="hidden" name="name" value="<?php echo $_GET['id']; ?>" />

If the above hidden field is submitted with a form then the recieving page will have the value of $_POST['name'] or $_GET['name'] (depending on the method used) asigned to the value that was $_GET['id'] on the form page.
Hi,
Thank you very much for your reply!

I added that code to my php file, but it does not work. Here is the error message I am getting:
Quote:Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in ***/invitationmanagement/index.php on line 69

Here is line 69 of my file:
<input type="hidden" name="invitecode" value="<?php echo $_GET['ic']; ?>">

My form is inside the following tags:
if ( mysql_num_rows( $result ) > 0 ){
  echo ' *FORM CONTENTS IS HERE* ';

Is there something else I can try? Thanks again!
Reply
#12
If the form is in an echo statement using single ' marks, then try this code instead... Wink

<input type="hidden" name="invitecode" value="'.$_GET['ic'].'">

Obviously, I'm expecting there's more to the form than this, but it should look something like this in context...

echo '<form><input type="hidden" name="invitecode" value="'.$_GET['ic'].'"></form>';
Reply
#13
musicalmidget Wrote:If the form is in an echo statement using single ' marks, then try this code instead... Wink

<input type="hidden" name="invitecode" value="'.$_GET['ic'].'">

Obviously, I'm expecting there's more to the form than this, but it should look something like this in context...

echo '<form><input type="hidden" name="invitecode" value="'.$_GET['ic'].'"></form>';
Thanks for your help! Smile
Reply
#14
No worries. Smile
Reply
#15
thanks kodaks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)