Hallo,
I display profiles from a table on a page.Each profile has an id and each profile can also be contacted with the link "Contact this person".
When somebody click on this link a new window(contact_form.php) is opened, where the user can enter his name, email and description.When the user submits this form, I save all the information into a table.
I have done upto here and everything is working fine.
Now, my question is How can I capture the profile id?? , say if the user has contacted the first profile, i would like to store this profile id no(that is 1).
I only see the problem is that the profile id is not being sent properly, How can i do this one??
ess.php is the form which displays all the profiles.
echo '<a href="java script:';
echo 'openWindow('contact_form.php?id=$row[id]','','toolbar=no,status=no','724','470','true');">Contact the Person</a>';
and in contact_form.php , i have this code:
<form name=form method="post" action="email.php">
and also
<td width="100%"><input type=button value="Submit" onclick="verify();">
</td>
<input type="hidden" name="id" value="<?=$HTTP_GET_VARS['id']?>">
and now email.php is the one which executes my sql query and it looks like:
$query = "insert into $mytable (name, email, text, contacted_id) values ('$name','$email','$description','$id')";
$result = mysql_query($query);
could somebody tell me where I'm doing wrong??
Thanks